diff --git a/source/includes/v1/_docs.md b/source/includes/v1/_docs.md index dd2479cc..bb615ec4 100644 --- a/source/includes/v1/_docs.md +++ b/source/includes/v1/_docs.md @@ -503,7 +503,7 @@ Retrieve a set of store information: "currency_format" : "$", "weight_unit" : "oz", "links" : { - "help" : "http://docs.woocommerce.com/document/woocommerce-rest-api/" + "help" : "https://woocommerce.com/document/woocommerce-rest-api/" }, "currency" : "USD", "permalinks_enabled" : true, diff --git a/source/includes/wc-analytics/_authentication.md b/source/includes/wc-analytics/_authentication.md new file mode 100644 index 00000000..eca20953 --- /dev/null +++ b/source/includes/wc-analytics/_authentication.md @@ -0,0 +1,4 @@ +# Authentication # + +WooCommerce Analytics API is also part of the WooCommerce REST API, so we can refer to its [authentication](index.html#authentication). + diff --git a/source/includes/wc-analytics/_index.md b/source/includes/wc-analytics/_index.md new file mode 100644 index 00000000..0e86cee4 --- /dev/null +++ b/source/includes/wc-analytics/_index.md @@ -0,0 +1,35902 @@ +# Index # + +By default, the API provides information about all available endpoints on the site under the `/wc-analytics` namespace. Authentication is not required to access the API index. + +### HTTP request ### + +
+
+ GET +
/wp-json/wc-analytics
+
+
+ +```shell +curl https://example.com/wp-json/wc-analytics +``` + +```javascript +WooCommerce.get("") + .then((response) => { + console.log(response.data); + }) + .catch((error) => { + console.log(error.response.data); + }); +``` + +```php +get('')); ?> +``` + +```python +print(wcapi.get("").json()) +``` + +```ruby +woocommerce.get("").parsed_response +``` + +> JSON response example: + +```json +{ + "namespace": "wc-analytics", + "routes": { + "/wc-analytics": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "namespace": { + "default": "wc-analytics", + "required": false + }, + "context": { + "default": "view", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics" + } + ] + } + }, + "/wc-analytics/customers": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date_registered", + "enum": [ + "username", + "name", + "country", + "city", + "state", + "postcode", + "date_registered", + "date_last_active", + "orders_count", + "total_spend", + "avg_order_value" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "registered_before": { + "description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "registered_after": { + "description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "search": { + "description": "Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.", + "type": "string", + "required": false + }, + "searchby": { + "description": "Limit results with `search` and `searchby` to specific fields containing the search term.", + "type": "string", + "default": "name", + "enum": [ + "name", + "username", + "email", + "all" + ], + "required": false + }, + "name_includes": { + "description": "Limit response to objects with specific names.", + "type": "string", + "required": false + }, + "name_excludes": { + "description": "Limit response to objects excluding specific names.", + "type": "string", + "required": false + }, + "username_includes": { + "description": "Limit response to objects with specific usernames.", + "type": "string", + "required": false + }, + "username_excludes": { + "description": "Limit response to objects excluding specific usernames.", + "type": "string", + "required": false + }, + "email_includes": { + "description": "Limit response to objects including emails.", + "type": "string", + "required": false + }, + "email_excludes": { + "description": "Limit response to objects excluding emails.", + "type": "string", + "required": false + }, + "country_includes": { + "description": "Limit response to objects with specific countries.", + "type": "string", + "required": false + }, + "country_excludes": { + "description": "Limit response to objects excluding specific countries.", + "type": "string", + "required": false + }, + "last_active_before": { + "description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_after": { + "description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "registered_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "orders_count_min": { + "description": "Limit response to objects with an order count greater than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_max": { + "description": "Limit response to objects with an order count less than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_between": { + "description": "Limit response to objects with an order count between two given integers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "total_spend_min": { + "description": "Limit response to objects with a total order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_max": { + "description": "Limit response to objects with a total order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_between": { + "description": "Limit response to objects with a total order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "avg_order_value_min": { + "description": "Limit response to objects with an average order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_max": { + "description": "Limit response to objects with an average order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_between": { + "description": "Limit response to objects with an average order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "last_order_before": { + "description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_order_after": { + "description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "users": { + "description": "Limit result to items with specified user ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "filter_empty": { + "description": "Filter out results where any of the passed fields are empty", + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "name", + "country", + "city", + "state", + "postcode" + ] + }, + "required": false + }, + "include": { + "description": "Limit result to items with specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/customers" + } + ] + } + }, + "/wc-analytics/customers/(?P[\\d-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique ID for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date_registered", + "enum": [ + "username", + "name", + "country", + "city", + "state", + "postcode", + "date_registered", + "date_last_active", + "orders_count", + "total_spend", + "avg_order_value" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "registered_before": { + "description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "registered_after": { + "description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "search": { + "description": "Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.", + "type": "string", + "required": false + }, + "searchby": { + "description": "Limit results with `search` and `searchby` to specific fields containing the search term.", + "type": "string", + "default": "name", + "enum": [ + "name", + "username", + "email", + "all" + ], + "required": false + }, + "name_includes": { + "description": "Limit response to objects with specific names.", + "type": "string", + "required": false + }, + "name_excludes": { + "description": "Limit response to objects excluding specific names.", + "type": "string", + "required": false + }, + "username_includes": { + "description": "Limit response to objects with specific usernames.", + "type": "string", + "required": false + }, + "username_excludes": { + "description": "Limit response to objects excluding specific usernames.", + "type": "string", + "required": false + }, + "email_includes": { + "description": "Limit response to objects including emails.", + "type": "string", + "required": false + }, + "email_excludes": { + "description": "Limit response to objects excluding emails.", + "type": "string", + "required": false + }, + "country_includes": { + "description": "Limit response to objects with specific countries.", + "type": "string", + "required": false + }, + "country_excludes": { + "description": "Limit response to objects excluding specific countries.", + "type": "string", + "required": false + }, + "last_active_before": { + "description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_after": { + "description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "registered_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "orders_count_min": { + "description": "Limit response to objects with an order count greater than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_max": { + "description": "Limit response to objects with an order count less than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_between": { + "description": "Limit response to objects with an order count between two given integers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "total_spend_min": { + "description": "Limit response to objects with a total order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_max": { + "description": "Limit response to objects with a total order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_between": { + "description": "Limit response to objects with a total order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "avg_order_value_min": { + "description": "Limit response to objects with an average order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_max": { + "description": "Limit response to objects with an average order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_between": { + "description": "Limit response to objects with an average order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "last_order_before": { + "description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_order_after": { + "description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "users": { + "description": "Limit result to items with specified user ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "filter_empty": { + "description": "Filter out results where any of the passed fields are empty", + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "name", + "country", + "city", + "state", + "postcode" + ] + }, + "required": false + }, + "include": { + "description": "Limit result to items with specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + } + } + } + ] + }, + "/wc-analytics/leaderboards": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 5, + "minimum": 1, + "maximum": 20, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "persisted_query": { + "description": "URL query to persist across links.", + "type": "string", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/leaderboards" + } + ] + } + }, + "/wc-analytics/leaderboards/allowed": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/leaderboards/allowed" + } + ] + } + }, + "/wc-analytics/leaderboards/(?P\\w+)": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "leaderboard": { + "type": "string", + "enum": [ + "customers", + "coupons", + "categories", + "products" + ], + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 5, + "minimum": 1, + "maximum": 20, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "persisted_query": { + "description": "URL query to persist across links.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wc-analytics/reports": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view" + ], + "default": "view", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + "/wc-analytics/reports/import": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "days": { + "description": "Number of days to import.", + "type": "integer", + "minimum": 0, + "required": false + }, + "skip_existing": { + "description": "Skip importing existing order data.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/import" + } + ] + } + }, + "/wc-analytics/reports/import/cancel": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/import/cancel" + } + ] + } + }, + "/wc-analytics/reports/import/delete": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/import/delete" + } + ] + } + }, + "/wc-analytics/reports/import/status": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/import/status" + } + ] + } + }, + "/wc-analytics/reports/import/totals": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "days": { + "description": "Number of days to import.", + "type": "integer", + "minimum": 0, + "required": false + }, + "skip_existing": { + "description": "Skip importing existing order data.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/import/totals" + } + ] + } + }, + "/wc-analytics/reports/(?P[a-z]+)/export": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "report_args": { + "description": "Parameters to pass on to the exported report.", + "type": "object", + "required": false + }, + "email": { + "description": "When true, email a link to download the export to the requesting user.", + "type": "boolean", + "required": false + } + } + } + ] + }, + "/wc-analytics/reports/(?P[a-z]+)/export/(?P[a-z0-9]+)/status": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + } + ] + }, + "/wc-analytics/reports/products": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "net_revenue", + "orders_count", + "items_sold", + "product_name", + "variations", + "sku" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "categories": { + "description": "Limit result to items from the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "products": { + "description": "Limit result to items with specified product ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "extended_info": { + "description": "Add additional piece of info about each product to the report.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products" + } + ] + } + }, + "/wc-analytics/reports/variations": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "net_revenue", + "orders_count", + "items_sold", + "sku" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified parent product(s).", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified parent product(s).", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variations": { + "description": "Limit result to items with specified variation ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "extended_info": { + "description": "Add additional piece of info about each variation to the report.", + "type": "boolean", + "default": false, + "required": false + }, + "attribute_is": { + "description": "Limit result set to variations that include the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "attribute_is_not": { + "description": "Limit result set to variations that don't include the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "category_includes": { + "description": "Limit result set to variations in the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "category_excludes": { + "description": "Limit result set to variations not in the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "products": { + "description": "Limit result to items with specified product ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/variations" + } + ] + } + }, + "/wc-analytics/reports/products/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "net_revenue", + "coupons", + "refunds", + "shipping", + "taxes", + "net_revenue", + "orders_count", + "items_sold" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "categories": { + "description": "Limit result to items from the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "products": { + "description": "Limit result to items with specified product ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "variations": { + "description": "Limit result to items with specified variation ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "product", + "category", + "variation" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products/stats" + } + ] + } + }, + "/wc-analytics/reports/variations/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "net_revenue", + "coupons", + "refunds", + "shipping", + "taxes", + "net_revenue", + "orders_count", + "items_sold" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "category_includes": { + "description": "Limit result to items from the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "category_excludes": { + "description": "Limit result set to variations not in the specified categories.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified parent product(s).", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified parent product(s).", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variations": { + "description": "Limit result to items with specified variation ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "product", + "category", + "variation" + ], + "required": false + }, + "attribute_is": { + "description": "Limit result set to orders that include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "attribute_is_not": { + "description": "Limit result set to orders that don't include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/variations/stats" + } + ] + } + }, + "/wc-analytics/reports/revenue/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "total_sales", + "coupons", + "refunds", + "shipping", + "taxes", + "net_revenue", + "orders_count", + "items_sold", + "gross_sales" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "product", + "category", + "variation", + "coupon", + "customer_type" + ], + "required": false + }, + "date_type": { + "description": "Override the \"woocommerce_date_type\" option that is used for the database date field considered for revenue reports.", + "type": "string", + "enum": [ + "date_paid", + "date_created", + "date_completed" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/revenue/stats" + } + ] + } + }, + "/wc-analytics/reports/orders": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "num_items_sold", + "net_total" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variation_includes": { + "description": "Limit result set to items that have the specified variation(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variation_excludes": { + "description": "Limit result set to items that don't have the specified variation(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "coupon_includes": { + "description": "Limit result set to items that have the specified coupon(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "coupon_excludes": { + "description": "Limit result set to items that don't have the specified coupon(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tax_rate_includes": { + "description": "Limit result set to items that have the specified tax rate(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tax_rate_excludes": { + "description": "Limit result set to items that don't have the specified tax rate(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "status_is": { + "description": "Limit result set to items that have the specified order status.", + "type": "array", + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "status_is_not": { + "description": "Limit result set to items that don't have the specified order status.", + "type": "array", + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "customer_type": { + "description": "Limit result set to returning or new customers.", + "type": "string", + "default": "", + "enum": [ + "", + "returning", + "new" + ], + "required": false + }, + "refunds": { + "description": "Limit result set to specific types of refunds.", + "type": "string", + "default": "", + "enum": [ + "", + "all", + "partial", + "full", + "none" + ], + "required": false + }, + "extended_info": { + "description": "Add additional piece of info about each coupon to the report.", + "type": "boolean", + "default": false, + "required": false + }, + "order_includes": { + "description": "Limit result set to items that have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "order_excludes": { + "description": "Limit result set to items that don't have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "attribute_is": { + "description": "Limit result set to orders that include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "attribute_is_not": { + "description": "Limit result set to orders that don't include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/orders" + } + ] + } + }, + "/wc-analytics/reports/orders/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "net_revenue", + "orders_count", + "avg_order_value" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "status_is": { + "description": "Limit result set to items that have the specified order status.", + "type": "array", + "default": null, + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "status_is_not": { + "description": "Limit result set to items that don't have the specified order status.", + "type": "array", + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variation_includes": { + "description": "Limit result set to items that have the specified variation(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "variation_excludes": { + "description": "Limit result set to items that don't have the specified variation(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "coupon_includes": { + "description": "Limit result set to items that have the specified coupon(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "coupon_excludes": { + "description": "Limit result set to items that don't have the specified coupon(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tax_rate_includes": { + "description": "Limit result set to items that have the specified tax rate(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tax_rate_excludes": { + "description": "Limit result set to items that don't have the specified tax rate(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "customer": { + "description": "Alias for customer_type (deprecated).", + "type": "string", + "enum": [ + "new", + "returning" + ], + "required": false + }, + "customer_type": { + "description": "Limit result set to orders that have the specified customer_type", + "type": "string", + "enum": [ + "new", + "returning" + ], + "required": false + }, + "refunds": { + "description": "Limit result set to specific types of refunds.", + "type": "string", + "default": "", + "enum": [ + "", + "all", + "partial", + "full", + "none" + ], + "required": false + }, + "attribute_is": { + "description": "Limit result set to orders that include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "attribute_is_not": { + "description": "Limit result set to orders that don't include products with the specified attributes.", + "type": "array", + "items": { + "type": "array" + }, + "default": [], + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "product", + "category", + "variation", + "coupon", + "customer_type" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/orders/stats" + } + ] + } + }, + "/wc-analytics/reports/categories": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "category_id", + "enum": [ + "category_id", + "items_sold", + "net_revenue", + "orders_count", + "products_count", + "category" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "status_is": { + "description": "Limit result set to items that have the specified order status.", + "type": "array", + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "status_is_not": { + "description": "Limit result set to items that don't have the specified order status.", + "type": "array", + "items": { + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "type": "string" + }, + "required": false + }, + "categories": { + "description": "Limit result set to all items that have the specified term assigned in the categories taxonomy.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "extended_info": { + "description": "Add additional piece of info about each category to the report.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/categories" + } + ] + } + }, + "/wc-analytics/reports/taxes": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "tax_rate_id", + "enum": [ + "name", + "tax_rate_id", + "tax_code", + "rate", + "order_tax", + "total_tax", + "shipping_tax", + "orders_count" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "taxes": { + "description": "Limit result set to items assigned one or more tax rates.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/taxes" + } + ] + } + }, + "/wc-analytics/reports/taxes/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "items_sold", + "total_sales", + "orders_count", + "products_count" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "taxes": { + "description": "Limit result set to all items that have the specified term assigned in the taxes taxonomy.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "tax_rate_id" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/taxes/stats" + } + ] + } + }, + "/wc-analytics/reports/coupons": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "coupon_id", + "enum": [ + "coupon_id", + "code", + "amount", + "orders_count" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "coupons": { + "description": "Limit result set to coupons assigned specific coupon IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "extended_info": { + "description": "Add additional piece of info about each coupon to the report.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/coupons" + } + ] + } + }, + "/wc-analytics/reports/coupons/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "amount", + "coupons_count", + "orders_count" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "coupons": { + "description": "Limit result set to coupons assigned specific coupon IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "product", + "variation", + "category", + "coupon" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/coupons/stats" + } + ] + } + }, + "/wc-analytics/reports/stock": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "stock_status", + "enum": [ + "stock_status", + "stock_quantity", + "date", + "id", + "include", + "title", + "sku" + ], + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "type": { + "description": "Limit result set to items assigned a stock report type.", + "type": "string", + "default": "all", + "enum": [ + "all", + "lowstock", + "instock", + "outofstock", + "onbackorder" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/stock" + } + ] + } + }, + "/wc-analytics/reports/stock/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/stock/stats" + } + ] + } + }, + "/wc-analytics/reports/downloads": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "product" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: products, orders, username, ip_address.", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "order_includes": { + "description": "Limit result set to items that have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "order_excludes": { + "description": "Limit result set to items that don't have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "customer_includes": { + "description": "Limit response to objects that have the specified user ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "customer_excludes": { + "description": "Limit response to objects that don't have the specified user ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "ip_address_includes": { + "description": "Limit response to objects that have a specified ip address.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "ip_address_excludes": { + "description": "Limit response to objects that don't have a specified ip address.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/downloads" + } + ] + } + }, + "/wc-analytics/reports/downloads/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "download_count" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "product_includes": { + "description": "Limit result set to items that have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "product_excludes": { + "description": "Limit result set to items that don't have the specified product(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "order_includes": { + "description": "Limit result set to items that have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "order_excludes": { + "description": "Limit result set to items that don't have the specified order ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "customer_includes": { + "description": "Limit response to objects that have the specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "customer_excludes": { + "description": "Limit response to objects that don't have the specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "ip_address_includes": { + "description": "Limit response to objects that have a specified ip address.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "ip_address_excludes": { + "description": "Limit response to objects that don't have a specified ip address.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/downloads/stats" + } + ] + } + }, + "/wc-analytics/reports/customers": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date_registered", + "enum": [ + "username", + "name", + "country", + "city", + "state", + "postcode", + "date_registered", + "date_last_active", + "orders_count", + "total_spend", + "avg_order_value" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "registered_before": { + "description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "registered_after": { + "description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "search": { + "description": "Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.", + "type": "string", + "required": false + }, + "searchby": { + "description": "Limit results with `search` and `searchby` to specific fields containing the search term.", + "type": "string", + "default": "name", + "enum": [ + "name", + "username", + "email", + "all" + ], + "required": false + }, + "name_includes": { + "description": "Limit response to objects with specific names.", + "type": "string", + "required": false + }, + "name_excludes": { + "description": "Limit response to objects excluding specific names.", + "type": "string", + "required": false + }, + "username_includes": { + "description": "Limit response to objects with specific usernames.", + "type": "string", + "required": false + }, + "username_excludes": { + "description": "Limit response to objects excluding specific usernames.", + "type": "string", + "required": false + }, + "email_includes": { + "description": "Limit response to objects including emails.", + "type": "string", + "required": false + }, + "email_excludes": { + "description": "Limit response to objects excluding emails.", + "type": "string", + "required": false + }, + "country_includes": { + "description": "Limit response to objects with specific countries.", + "type": "string", + "required": false + }, + "country_excludes": { + "description": "Limit response to objects excluding specific countries.", + "type": "string", + "required": false + }, + "last_active_before": { + "description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_after": { + "description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "registered_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "orders_count_min": { + "description": "Limit response to objects with an order count greater than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_max": { + "description": "Limit response to objects with an order count less than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_between": { + "description": "Limit response to objects with an order count between two given integers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "total_spend_min": { + "description": "Limit response to objects with a total order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_max": { + "description": "Limit response to objects with a total order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_between": { + "description": "Limit response to objects with a total order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "avg_order_value_min": { + "description": "Limit response to objects with an average order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_max": { + "description": "Limit response to objects with an average order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_between": { + "description": "Limit response to objects with an average order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "last_order_before": { + "description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_order_after": { + "description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "customers": { + "description": "Limit result to items with specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "users": { + "description": "Limit result to items with specified user ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "filter_empty": { + "description": "Filter out results where any of the passed fields are empty", + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "name", + "country", + "city", + "state", + "postcode" + ] + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/customers" + } + ] + } + }, + "/wc-analytics/reports/customers/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "registered_before": { + "description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "registered_after": { + "description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "match": { + "description": "Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories", + "type": "string", + "default": "all", + "enum": [ + "all", + "any" + ], + "required": false + }, + "search": { + "description": "Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.", + "type": "string", + "required": false + }, + "searchby": { + "description": "Limit results with `search` and `searchby` to specific fields containing the search term.", + "type": "string", + "default": "name", + "enum": [ + "name", + "username", + "email", + "all" + ], + "required": false + }, + "name_includes": { + "description": "Limit response to objects with specific names.", + "type": "string", + "required": false + }, + "name_excludes": { + "description": "Limit response to objects excluding specific names.", + "type": "string", + "required": false + }, + "username_includes": { + "description": "Limit response to objects with specific usernames.", + "type": "string", + "required": false + }, + "username_excludes": { + "description": "Limit response to objects excluding specific usernames.", + "type": "string", + "required": false + }, + "email_includes": { + "description": "Limit response to objects including emails.", + "type": "string", + "required": false + }, + "email_excludes": { + "description": "Limit response to objects excluding emails.", + "type": "string", + "required": false + }, + "country_includes": { + "description": "Limit response to objects with specific countries.", + "type": "string", + "required": false + }, + "country_excludes": { + "description": "Limit response to objects excluding specific countries.", + "type": "string", + "required": false + }, + "last_active_before": { + "description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_after": { + "description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_active_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "registered_between": { + "description": "Limit response to objects last active between two given ISO8601 compliant datetime.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "orders_count_min": { + "description": "Limit response to objects with an order count greater than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_max": { + "description": "Limit response to objects with an order count less than or equal to given integer.", + "type": "integer", + "required": false + }, + "orders_count_between": { + "description": "Limit response to objects with an order count between two given integers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "total_spend_min": { + "description": "Limit response to objects with a total order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_max": { + "description": "Limit response to objects with a total order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "total_spend_between": { + "description": "Limit response to objects with a total order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "avg_order_value_min": { + "description": "Limit response to objects with an average order spend greater than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_max": { + "description": "Limit response to objects with an average order spend less than or equal to given number.", + "type": "number", + "required": false + }, + "avg_order_value_between": { + "description": "Limit response to objects with an average order spend between two given numbers.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "last_order_before": { + "description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "last_order_after": { + "description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.", + "type": "string", + "format": "date-time", + "required": false + }, + "customers": { + "description": "Limit result to items with specified customer ids.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/customers/stats" + } + ] + } + }, + "/wc-analytics/reports/performance-indicators": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "stats": { + "description": "Limit response to specific report stats. Allowed values: .", + "type": "array", + "items": { + "type": "string", + "enum": [] + }, + "default": [], + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/performance-indicators" + } + ] + } + }, + "/wc-analytics/reports/performance-indicators/allowed": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "stats": { + "description": "Limit response to specific report stats. Allowed values: .", + "type": "array", + "items": { + "type": "string", + "enum": [] + }, + "default": [], + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/performance-indicators/allowed" + } + ] + } + }, + "/wc-analytics/admin/notes": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "note_id", + "date", + "type", + "title", + "status" + ], + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "type": { + "description": "Type of note.", + "type": "array", + "items": { + "enum": [ + "error", + "warning", + "update", + "info", + "marketing", + "survey", + "email" + ], + "type": "string" + }, + "required": false + }, + "status": { + "description": "Status of note.", + "type": "array", + "items": { + "enum": [ + "pending", + "actioned", + "unactioned", + "snoozed", + "sent" + ], + "type": "string" + }, + "required": false + }, + "source": { + "description": "Source of note.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "note_id", + "date", + "type", + "title", + "status" + ], + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "type": { + "description": "Type of note.", + "type": "array", + "items": { + "enum": [ + "error", + "warning", + "update", + "info", + "marketing", + "survey", + "email" + ], + "type": "string" + }, + "required": false + }, + "status": { + "description": "Status of note.", + "type": "array", + "items": { + "enum": [ + "pending", + "actioned", + "unactioned", + "snoozed", + "sent" + ], + "type": "string" + }, + "required": false + }, + "source": { + "description": "Source of note.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/admin/notes" + } + ] + } + }, + "/wc-analytics/admin/notes/(?P[\\d-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "GET", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique ID for the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique ID for the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique ID for the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique ID for the resource.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/admin/notes/delete/(?P[\\d-]+)": { + "namespace": "wc-analytics", + "methods": [ + "DELETE", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "DELETE" + ], + "args": [] + }, + { + "methods": [ + "DELETE" + ], + "args": [] + } + ] + }, + "/wc-analytics/admin/notes/delete/all": { + "namespace": "wc-analytics", + "methods": [ + "DELETE", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "DELETE" + ], + "args": { + "status": { + "description": "Status of note.", + "type": "array", + "items": { + "enum": [ + "pending", + "actioned", + "unactioned", + "snoozed", + "sent" + ], + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "status": { + "description": "Status of note.", + "type": "array", + "items": { + "enum": [ + "pending", + "actioned", + "unactioned", + "snoozed", + "sent" + ], + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/admin/notes/delete/all" + } + ] + } + }, + "/wc-analytics/admin/notes/tracker/(?P[\\d-]+)/user/(?P[\\d-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + }, + { + "methods": [ + "GET" + ], + "args": [] + } + ] + }, + "/wc-analytics/admin/notes/update": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/admin/notes/update" + } + ] + } + }, + "/wc-analytics/admin/notes/experimental-activate-promo/(?P[\\w-]+)": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": [] + } + ] + }, + "/wc-analytics/admin/notes/(?P[\\d-]+)/action/(?P[\\d-]+)": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "note_id": { + "description": "Unique ID for the Note.", + "type": "integer", + "required": false + }, + "action_id": { + "description": "Unique ID for the Note Action.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "note_id": { + "description": "Unique ID for the Note.", + "type": "integer", + "required": false + }, + "action_id": { + "description": "Unique ID for the Note Action.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/coupons": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to coupons with codes matching a given string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified" + ], + "required": false + }, + "code": { + "description": "Limit result set to resources with a specific code.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "code": { + "description": "Coupon code.", + "type": "string", + "required": true + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "default": "fixed_cart", + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "default": false, + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "default": false, + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "default": false, + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to coupons with codes matching a given string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified" + ], + "required": false + }, + "code": { + "description": "Limit result set to resources with a specific code.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "code": { + "description": "Coupon code.", + "type": "string", + "required": true + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "default": "fixed_cart", + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "default": false, + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "default": false, + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "default": false, + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/coupons" + } + ] + } + }, + "/wc-analytics/coupons/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "code": { + "description": "Coupon code.", + "type": "string", + "required": false + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "code": { + "description": "Coupon code.", + "type": "string", + "required": false + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + } + ] + }, + "/wc-analytics/coupons/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "code": { + "description": "Coupon code.", + "type": "string", + "required": false + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "code": { + "description": "Coupon code.", + "type": "string", + "required": false + }, + "amount": { + "description": "The amount of discount. Should always be numeric, even if setting a percentage.", + "type": "string", + "required": false + }, + "status": { + "description": "The status of the coupon. Should always be draft, published, or pending review", + "type": "string", + "required": false + }, + "discount_type": { + "description": "Determines the type of discount that will be applied.", + "type": "string", + "enum": [ + "percent", + "fixed_cart", + "fixed_product" + ], + "required": false + }, + "description": { + "description": "Coupon description.", + "type": "string", + "required": false + }, + "date_expires": { + "description": "The date the coupon expires, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_expires_gmt": { + "description": "The date the coupon expires, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "individual_use": { + "description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.", + "type": "boolean", + "required": false + }, + "product_ids": { + "description": "List of product IDs the coupon can be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_ids": { + "description": "List of product IDs the coupon cannot be used on.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "usage_limit": { + "description": "How many times the coupon can be used in total.", + "type": "integer", + "required": false + }, + "usage_limit_per_user": { + "description": "How many times the coupon can be used per customer.", + "type": "integer", + "required": false + }, + "limit_usage_to_x_items": { + "description": "Max number of items in the cart the coupon can be applied to.", + "type": "integer", + "required": false + }, + "free_shipping": { + "description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.", + "type": "boolean", + "required": false + }, + "product_categories": { + "description": "List of category IDs the coupon applies to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "excluded_product_categories": { + "description": "List of category IDs the coupon does not apply to.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "exclude_sale_items": { + "description": "If true, this coupon will not be applied to items that have sale prices.", + "type": "boolean", + "required": false + }, + "minimum_amount": { + "description": "Minimum order amount that needs to be in the cart before coupon applies.", + "type": "string", + "required": false + }, + "maximum_amount": { + "description": "Maximum order amount allowed when using the coupon.", + "type": "string", + "required": false + }, + "email_restrictions": { + "description": "List of email addresses that can use this coupon.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/coupons/batch" + } + ] + } + }, + "/wc-analytics/data": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + }, + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/data" + } + ] + } + }, + "/wc-analytics/data/countries/locales": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + }, + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/data/countries/locales" + } + ] + } + }, + "/wc-analytics/data/countries": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + }, + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/data/countries" + } + ] + } + }, + "/wc-analytics/data/countries/(?P[\\w-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "location": { + "description": "ISO3166 alpha-2 country code.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "location": { + "description": "ISO3166 alpha-2 country code.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wc-analytics/data/download-ips": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": [] + }, + { + "methods": [ + "GET" + ], + "args": [] + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/data/download-ips" + } + ] + } + }, + "/wc-analytics/orders": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "status": { + "default": [ + "any" + ], + "description": "Limit result set to orders which have specific statuses.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ] + }, + "required": false + }, + "customer": { + "description": "Limit result set to orders assigned a specific customer.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to orders assigned a specific product.", + "type": "integer", + "required": false + }, + "dp": { + "default": 0, + "description": "Number of decimal points to use in each resource.", + "type": "integer", + "required": false + }, + "order_item_display_meta": { + "default": false, + "description": "Only show meta which is meant to be displayed for an order.", + "type": "boolean", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "number": { + "description": "Limit result set to orders matching part of an order number.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "default": "pending", + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "default": "TWD", + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "default": 0, + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "default": false, + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "default": false, + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "status": { + "default": [ + "any" + ], + "description": "Limit result set to orders which have specific statuses.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "any", + "trash", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ] + }, + "required": false + }, + "customer": { + "description": "Limit result set to orders assigned a specific customer.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to orders assigned a specific product.", + "type": "integer", + "required": false + }, + "dp": { + "default": 0, + "description": "Number of decimal points to use in each resource.", + "type": "integer", + "required": false + }, + "order_item_display_meta": { + "default": false, + "description": "Only show meta which is meant to be displayed for an order.", + "type": "boolean", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "number": { + "description": "Limit result set to orders matching part of an order number.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "default": "pending", + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "default": "TWD", + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "default": 0, + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "default": false, + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "default": false, + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/orders" + } + ] + } + }, + "/wc-analytics/orders/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + } + ] + }, + "/wc-analytics/orders/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "parent_id": { + "description": "Parent order ID.", + "type": "integer", + "required": false + }, + "status": { + "description": "Order status.", + "type": "string", + "enum": [ + "auto-draft", + "pending", + "processing", + "on-hold", + "completed", + "cancelled", + "refunded", + "failed", + "checkout-draft" + ], + "required": false + }, + "currency": { + "description": "Currency the order was created with, in ISO format.", + "type": "string", + "enum": [ + "AED", + "AFN", + "ALL", + "AMD", + "ANG", + "AOA", + "ARS", + "AUD", + "AWG", + "AZN", + "BAM", + "BBD", + "BDT", + "BGN", + "BHD", + "BIF", + "BMD", + "BND", + "BOB", + "BRL", + "BSD", + "BTC", + "BTN", + "BWP", + "BYR", + "BYN", + "BZD", + "CAD", + "CDF", + "CHF", + "CLP", + "CNY", + "COP", + "CRC", + "CUC", + "CUP", + "CVE", + "CZK", + "DJF", + "DKK", + "DOP", + "DZD", + "EGP", + "ERN", + "ETB", + "EUR", + "FJD", + "FKP", + "GBP", + "GEL", + "GGP", + "GHS", + "GIP", + "GMD", + "GNF", + "GTQ", + "GYD", + "HKD", + "HNL", + "HRK", + "HTG", + "HUF", + "IDR", + "ILS", + "IMP", + "INR", + "IQD", + "IRR", + "IRT", + "ISK", + "JEP", + "JMD", + "JOD", + "JPY", + "KES", + "KGS", + "KHR", + "KMF", + "KPW", + "KRW", + "KWD", + "KYD", + "KZT", + "LAK", + "LBP", + "LKR", + "LRD", + "LSL", + "LYD", + "MAD", + "MDL", + "MGA", + "MKD", + "MMK", + "MNT", + "MOP", + "MRU", + "MUR", + "MVR", + "MWK", + "MXN", + "MYR", + "MZN", + "NAD", + "NGN", + "NIO", + "NOK", + "NPR", + "NZD", + "OMR", + "PAB", + "PEN", + "PGK", + "PHP", + "PKR", + "PLN", + "PRB", + "PYG", + "QAR", + "RON", + "RSD", + "RUB", + "RWF", + "SAR", + "SBD", + "SCR", + "SDG", + "SEK", + "SGD", + "SHP", + "SLL", + "SOS", + "SRD", + "SSP", + "STN", + "SYP", + "SZL", + "THB", + "TJS", + "TMT", + "TND", + "TOP", + "TRY", + "TTD", + "TWD", + "TZS", + "UAH", + "UGX", + "USD", + "UYU", + "UZS", + "VEF", + "VES", + "VND", + "VUV", + "WST", + "XAF", + "XCD", + "XOF", + "XPF", + "YER", + "ZAR", + "ZMW" + ], + "required": false + }, + "customer_id": { + "description": "User ID who owns the order. 0 for guests.", + "type": "integer", + "required": false + }, + "customer_note": { + "description": "Note left by customer during checkout.", + "type": "string", + "required": false + }, + "billing": { + "description": "Billing address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "email": { + "description": "Email address.", + "type": [ + "string", + "null" + ], + "format": "email", + "context": [ + "view", + "edit" + ] + }, + "phone": { + "description": "Phone number.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping": { + "description": "Shipping address.", + "type": "object", + "properties": { + "first_name": { + "description": "First name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "last_name": { + "description": "Last name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "company": { + "description": "Company name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_1": { + "description": "Address line 1", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "address_2": { + "description": "Address line 2", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "city": { + "description": "City name.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "state": { + "description": "ISO code or name of the state, province or district.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "postcode": { + "description": "Postal code.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "country": { + "description": "Country code in ISO 3166-1 alpha-2 format.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "payment_method": { + "description": "Payment method ID.", + "type": "string", + "required": false + }, + "payment_method_title": { + "description": "Payment method title.", + "type": "string", + "required": false + }, + "transaction_id": { + "description": "Unique transaction ID.", + "type": "string", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "line_items": { + "description": "Line items data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Product name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "parent_name": { + "description": "Parent product name if the product is a variation.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "product_id": { + "description": "Product ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "variation_id": { + "description": "Variation ID, if applicable.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "quantity": { + "description": "Quantity ordered.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of product.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Line subtotal (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal_tax": { + "description": "Line subtotal tax (before discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "display_key": { + "description": "Meta key for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "display_value": { + "description": "Meta value for UI display.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "sku": { + "description": "Product SKU.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "price": { + "description": "Product price.", + "type": "number", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "image": { + "description": "Properties of the main product image.", + "type": "object", + "context": [ + "view", + "edit" + ], + "readonly": true, + "properties": { + "id": { + "description": "Image ID.", + "type": "integer", + "context": [ + "view", + "edit" + ] + }, + "src": { + "description": "Image URL.", + "type": "string", + "format": "uri", + "context": [ + "view", + "edit" + ] + } + } + } + } + }, + "required": false + }, + "shipping_lines": { + "description": "Shipping lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "method_title": { + "description": "Shipping method name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "method_id": { + "description": "Shipping method ID.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "instance_id": { + "description": "Shipping instance ID.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "fee_lines": { + "description": "Fee lines data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "name": { + "description": "Fee name.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "tax_class": { + "description": "Tax class of fee.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "tax_status": { + "description": "Tax status of fee.", + "type": "string", + "context": [ + "view", + "edit" + ], + "enum": [ + "taxable", + "none" + ] + }, + "total": { + "description": "Line total (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "total_tax": { + "description": "Line total tax (after discounts).", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "taxes": { + "description": "Line taxes.", + "type": "array", + "context": [ + "view", + "edit" + ], + "readonly": true, + "items": { + "type": "object", + "properties": { + "id": { + "description": "Tax rate ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "total": { + "description": "Tax total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "subtotal": { + "description": "Tax subtotal.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + } + } + } + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "coupon_lines": { + "description": "Coupons line data.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Item ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "code": { + "description": "Coupon code.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + }, + "discount": { + "description": "Discount total.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_tax": { + "description": "Discount total tax.", + "type": "string", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "discount_type": { + "description": "Discount type.", + "type": "string", + "context": [ + "view" + ], + "readonly": true + }, + "nominal_amount": { + "description": "Discount amount as defined in the coupon (absolute value or a percent, depending on the discount type).", + "type": "number", + "context": [ + "view" + ], + "readonly": true + }, + "free_shipping": { + "description": "Whether the coupon grants free shipping or not.", + "type": "boolean", + "context": [ + "view" + ], + "readonly": true + }, + "meta_data": { + "description": "Meta data.", + "type": "array", + "context": [ + "view", + "edit" + ], + "items": { + "type": "object", + "properties": { + "id": { + "description": "Meta ID.", + "type": "integer", + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "key": { + "description": "Meta key.", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "value": { + "description": "Meta value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + } + } + }, + "required": false + }, + "set_paid": { + "description": "Define if the order is paid. It will set the status to processing and reduce stock items.", + "type": "boolean", + "required": false + }, + "manual_update": { + "description": "Set the action as manual so that the order note registers as \"added by user\".", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/orders/batch" + } + ] + } + }, + "/wc-analytics/products": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name or sku.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "popularity", + "rating", + "popularity", + "rating", + "menu_order", + "price", + "popularity", + "rating" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "type": { + "description": "Limit result set to products assigned a specific type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "featured": { + "description": "Limit result set to featured products.", + "type": "boolean", + "required": false + }, + "category": { + "description": "Limit result set to products assigned a specific category ID.", + "type": "string", + "required": false + }, + "tag": { + "description": "Limit result set to products assigned a specific tag ID.", + "type": "string", + "required": false + }, + "shipping_class": { + "description": "Limit result set to products assigned a specific shipping class ID.", + "type": "string", + "required": false + }, + "attribute": { + "description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.", + "type": "string", + "required": false + }, + "attribute_term": { + "description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "search_sku": { + "description": "Limit results to those with a SKU that partial matches a string.", + "type": "string", + "required": false + }, + "low_in_stock": { + "description": "Limit result set to products that are low or out of stock. (Deprecated)", + "type": "boolean", + "default": false, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "default": "simple", + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "default": false, + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "default": "visible", + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "default": false, + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "default": true, + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name or sku.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "popularity", + "rating", + "popularity", + "rating", + "menu_order", + "price", + "popularity", + "rating" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "type": { + "description": "Limit result set to products assigned a specific type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "featured": { + "description": "Limit result set to featured products.", + "type": "boolean", + "required": false + }, + "category": { + "description": "Limit result set to products assigned a specific category ID.", + "type": "string", + "required": false + }, + "tag": { + "description": "Limit result set to products assigned a specific tag ID.", + "type": "string", + "required": false + }, + "shipping_class": { + "description": "Limit result set to products assigned a specific shipping class ID.", + "type": "string", + "required": false + }, + "attribute": { + "description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.", + "type": "string", + "required": false + }, + "attribute_term": { + "description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "search_sku": { + "description": "Limit results to those with a SKU that partial matches a string.", + "type": "string", + "required": false + }, + "low_in_stock": { + "description": "Limit result set to products that are low or out of stock. (Deprecated)", + "type": "boolean", + "default": false, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "default": "simple", + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "default": false, + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "default": "visible", + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "default": false, + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "default": true, + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products" + } + ] + } + }, + "/wc-analytics/products/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "description": "Whether to bypass trash and force deletion.", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "description": "Whether to bypass trash and force deletion.", + "type": "boolean", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/batch" + } + ] + } + }, + "/wc-analytics/products/suggested-products": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "popularity", + "rating", + "popularity", + "rating", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "type": { + "description": "Limit result set to products assigned a specific type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "featured": { + "description": "Limit result set to featured products.", + "type": "boolean", + "required": false + }, + "category": { + "description": "Limit result set to products assigned a specific category ID.", + "type": "string", + "required": false + }, + "tag": { + "description": "Limit result set to products assigned a specific tag ID.", + "type": "string", + "required": false + }, + "shipping_class": { + "description": "Limit result set to products assigned a specific shipping class ID.", + "type": "string", + "required": false + }, + "attribute": { + "description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.", + "type": "string", + "required": false + }, + "attribute_term": { + "description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).", + "type": "string", + "required": false + }, + "in_stock": { + "description": "Limit result set to products in stock or out of stock.", + "type": "boolean", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "categories": { + "description": "Limit result set to specific product categorie ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tags": { + "description": "Limit result set to specific product tag ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "limit": { + "description": "Limit result set to specific amount of suggested products.", + "type": "integer", + "default": 5, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "embed", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "popularity", + "rating", + "popularity", + "rating", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "type": { + "description": "Limit result set to products assigned a specific type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "featured": { + "description": "Limit result set to featured products.", + "type": "boolean", + "required": false + }, + "category": { + "description": "Limit result set to products assigned a specific category ID.", + "type": "string", + "required": false + }, + "tag": { + "description": "Limit result set to products assigned a specific tag ID.", + "type": "string", + "required": false + }, + "shipping_class": { + "description": "Limit result set to products assigned a specific shipping class ID.", + "type": "string", + "required": false + }, + "attribute": { + "description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.", + "type": "string", + "required": false + }, + "attribute_term": { + "description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).", + "type": "string", + "required": false + }, + "in_stock": { + "description": "Limit result set to products in stock or out of stock.", + "type": "boolean", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "categories": { + "description": "Limit result set to specific product categorie ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "tags": { + "description": "Limit result set to specific product tag ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "limit": { + "description": "Limit result set to specific amount of suggested products.", + "type": "integer", + "default": 5, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/suggested-products" + } + ] + } + }, + "/wc-analytics/products/(?P[\\d]+)/duplicate": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "POST" + ], + "endpoints": [ + { + "methods": [ + "POST" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "slug": { + "description": "Product slug.", + "type": "string", + "required": false + }, + "date_created": { + "description": "The date the product was created, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_created_gmt": { + "description": "The date the product was created, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "simple", + "grouped", + "external", + "variable" + ], + "required": false + }, + "status": { + "description": "Product status (post status).", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future", + "auto-draft", + "trash" + ], + "required": false + }, + "featured": { + "description": "Featured product.", + "type": "boolean", + "required": false + }, + "catalog_visibility": { + "description": "Catalog visibility.", + "type": "string", + "enum": [ + "visible", + "catalog", + "search", + "hidden" + ], + "required": false + }, + "description": { + "description": "Product description.", + "type": "string", + "required": false + }, + "short_description": { + "description": "Product short description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Product regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Product sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "virtual": { + "description": "If the product is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the product is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "external_url": { + "description": "Product external URL. Only for external products.", + "type": "string", + "format": "uri", + "required": false + }, + "button_text": { + "description": "Product external button text. Only for external products.", + "type": "string", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at product level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the product.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "sold_individually": { + "description": "Allow one item to be bought in a single order.", + "type": "boolean", + "required": false + }, + "weight": { + "description": "Product weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Product dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Product length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Product width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Product height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "reviews_allowed": { + "description": "Allow reviews.", + "type": "boolean", + "required": false + }, + "post_password": { + "description": "Post password.", + "type": "string", + "required": false + }, + "upsell_ids": { + "description": "List of up-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "cross_sell_ids": { + "description": "List of cross-sell products IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + }, + "purchase_note": { + "description": "Optional note to send the customer after purchase.", + "type": "string", + "required": false + }, + "categories": { + "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 + } + } + }, + "required": false + }, + "tags": { + "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 + } + } + }, + "required": false + }, + "images": { + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + } + }, + "required": false + }, + "attributes": { + "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" + ] + } + } + }, + "required": false + }, + "default_attributes": { + "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" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "search": { + "description": "Search by similar attribute name.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "description": "Name for the resource.", + "type": "string", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "default": "select", + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "default": "menu_order", + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "default": false, + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "search": { + "description": "Search by similar attribute name.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "description": "Name for the resource.", + "type": "string", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "default": "select", + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "default": "menu_order", + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "default": false, + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/attributes" + } + ] + } + }, + "/wc-analytics/products/attributes/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Attribute name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": true, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Attribute name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": true, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Attribute name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Attribute name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "type": { + "description": "Type of attribute.", + "type": "string", + "enum": [ + "select" + ], + "required": false + }, + "order_by": { + "description": "Default sort order.", + "type": "string", + "enum": [ + "menu_order", + "name", + "name_num", + "id" + ], + "required": false + }, + "has_archives": { + "description": "Enable/Disable attribute archives.", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/attributes/batch" + } + ] + } + }, + "/wc-analytics/products/attributes/(?P[a-z0-9_\\-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "Slug identifier for the resource.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "Slug identifier for the resource.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes/(?P[\\d]+)/terms": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + }, + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "type": "string", + "description": "Name for the resource.", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + }, + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "type": "string", + "description": "Name for the resource.", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes/(?P[\\d]+)/terms/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "description": "Term name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "description": "Term name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes/(?P[\\d]+)/terms/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "description": "Term name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "attribute_id": { + "description": "Unique identifier for the attribute of the terms.", + "type": "integer", + "required": false + }, + "name": { + "description": "Term name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/attributes/(?P[a-z0-9_\\-]+)/terms": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + } + } + } + ] + }, + "/wc-analytics/products/categories": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + }, + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "type": "string", + "description": "Name for the resource.", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "default": "default", + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by resource attribute.", + "type": "string", + "default": "name", + "enum": [ + "id", + "include", + "name", + "slug", + "term_group", + "description", + "count" + ], + "required": false + }, + "hide_empty": { + "description": "Whether to hide resources not assigned to any products.", + "type": "boolean", + "default": false, + "required": false + }, + "parent": { + "description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.", + "type": "integer", + "required": false + }, + "product": { + "description": "Limit result set to resources assigned to a specific product.", + "type": "integer", + "default": null, + "required": false + }, + "slug": { + "description": "Limit result set to resources with a specific slug.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "name": { + "type": "string", + "description": "Name for the resource.", + "required": true + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "default": "default", + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/categories" + } + ] + } + }, + "/wc-analytics/products/categories/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Category name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "name": { + "description": "Category name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/categories/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Category name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "name": { + "description": "Category name.", + "type": "string", + "required": false + }, + "slug": { + "description": "An alphanumeric identifier for the resource unique to its type.", + "type": "string", + "required": false + }, + "parent": { + "description": "The ID for the parent of the resource.", + "type": "integer", + "required": false + }, + "description": { + "description": "HTML description of the resource.", + "type": "string", + "required": false + }, + "display": { + "description": "Category archive display type.", + "type": "string", + "enum": [ + "default", + "products", + "subcategories", + "both" + ], + "required": false + }, + "image": { + "description": "Image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort the resource.", + "type": "integer", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/categories/batch" + } + ] + } + }, + "/wc-analytics/products/(?P[\\d]+)/variations": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST", + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/(?P[\\d]+)/variations/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "id": { + "description": "Unique identifier for the variation.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/(?P[\\d]+)/variations/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "type": { + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/(?P[\\d]+)/variations/generate": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "POST", + "POST", + "POST" + ], + "endpoints": [ + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "delete": { + "description": "Deletes unused variations.", + "type": "boolean", + "required": false + }, + "default_values": { + "description": "Default values for generated variations.", + "type": "object", + "properties": { + "type": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ] + }, + "description": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation description.", + "type": "string" + }, + "sku": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock Keeping Unit.", + "type": "string" + }, + "global_unique_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string" + }, + "regular_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation regular price.", + "type": "string" + }, + "sale_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation sale price.", + "type": "string" + }, + "date_on_sale_from": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_from_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ] + }, + "virtual": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is virtual.", + "type": "boolean" + }, + "downloadable": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is downloadable.", + "type": "boolean" + }, + "downloads": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer" + }, + "download_expiry": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of days until access to downloadable files expires.", + "type": "integer" + }, + "tax_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ] + }, + "tax_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax class.", + "type": "string" + }, + "manage_stock": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock management at variation level.", + "type": "boolean" + }, + "stock_quantity": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock quantity.", + "type": "integer" + }, + "stock_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ] + }, + "backorders": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ] + }, + "low_stock_amount": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ] + }, + "weight": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation weight (kg).", + "type": "string" + }, + "dimensions": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "shipping_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Shipping class slug.", + "type": "string" + }, + "image": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "menu_order": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Menu order, used to custom sort products.", + "type": "integer" + }, + "meta_data": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + }, + "name": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent name.", + "type": "string" + }, + "parent_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent ID.", + "type": "integer" + } + }, + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "delete": { + "description": "Deletes unused variations.", + "type": "boolean", + "required": false + }, + "default_values": { + "description": "Default values for generated variations.", + "type": "object", + "properties": { + "type": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ] + }, + "description": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation description.", + "type": "string" + }, + "sku": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock Keeping Unit.", + "type": "string" + }, + "global_unique_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string" + }, + "regular_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation regular price.", + "type": "string" + }, + "sale_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation sale price.", + "type": "string" + }, + "date_on_sale_from": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_from_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ] + }, + "virtual": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is virtual.", + "type": "boolean" + }, + "downloadable": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is downloadable.", + "type": "boolean" + }, + "downloads": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer" + }, + "download_expiry": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of days until access to downloadable files expires.", + "type": "integer" + }, + "tax_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ] + }, + "tax_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax class.", + "type": "string" + }, + "manage_stock": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock management at variation level.", + "type": "boolean" + }, + "stock_quantity": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock quantity.", + "type": "integer" + }, + "stock_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ] + }, + "backorders": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ] + }, + "low_stock_amount": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ] + }, + "weight": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation weight (kg).", + "type": "string" + }, + "dimensions": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "shipping_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Shipping class slug.", + "type": "string" + }, + "image": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "menu_order": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Menu order, used to custom sort products.", + "type": "integer" + }, + "meta_data": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + }, + "name": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent name.", + "type": "string" + }, + "parent_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent ID.", + "type": "integer" + } + }, + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "delete": { + "description": "Deletes unused variations.", + "type": "boolean", + "required": false + }, + "default_values": { + "description": "Default values for generated variations.", + "type": "object", + "properties": { + "type": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ] + }, + "description": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation description.", + "type": "string" + }, + "sku": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock Keeping Unit.", + "type": "string" + }, + "global_unique_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string" + }, + "regular_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation regular price.", + "type": "string" + }, + "sale_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation sale price.", + "type": "string" + }, + "date_on_sale_from": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_from_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ] + }, + "virtual": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is virtual.", + "type": "boolean" + }, + "downloadable": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is downloadable.", + "type": "boolean" + }, + "downloads": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer" + }, + "download_expiry": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of days until access to downloadable files expires.", + "type": "integer" + }, + "tax_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ] + }, + "tax_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax class.", + "type": "string" + }, + "manage_stock": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock management at variation level.", + "type": "boolean" + }, + "stock_quantity": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock quantity.", + "type": "integer" + }, + "stock_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ] + }, + "backorders": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ] + }, + "low_stock_amount": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ] + }, + "weight": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation weight (kg).", + "type": "string" + }, + "dimensions": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "shipping_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Shipping class slug.", + "type": "string" + }, + "image": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "menu_order": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Menu order, used to custom sort products.", + "type": "integer" + }, + "meta_data": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + }, + "name": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent name.", + "type": "string" + }, + "parent_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent ID.", + "type": "integer" + } + }, + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the variable product.", + "type": "integer", + "required": false + }, + "delete": { + "description": "Deletes unused variations.", + "type": "boolean", + "required": false + }, + "default_values": { + "description": "Default values for generated variations.", + "type": "object", + "properties": { + "type": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ] + }, + "description": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation description.", + "type": "string" + }, + "sku": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock Keeping Unit.", + "type": "string" + }, + "global_unique_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string" + }, + "regular_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation regular price.", + "type": "string" + }, + "sale_price": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation sale price.", + "type": "string" + }, + "date_on_sale_from": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_from_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "date_on_sale_to_gmt": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ] + }, + "status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ] + }, + "virtual": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is virtual.", + "type": "boolean" + }, + "downloadable": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If the variation is downloadable.", + "type": "boolean" + }, + "downloads": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer" + }, + "download_expiry": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Number of days until access to downloadable files expires.", + "type": "integer" + }, + "tax_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ] + }, + "tax_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Tax class.", + "type": "string" + }, + "manage_stock": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock management at variation level.", + "type": "boolean" + }, + "stock_quantity": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Stock quantity.", + "type": "integer" + }, + "stock_status": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ] + }, + "backorders": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ] + }, + "low_stock_amount": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ] + }, + "weight": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation weight (kg).", + "type": "string" + }, + "dimensions": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "shipping_class": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Shipping class slug.", + "type": "string" + }, + "image": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + } + }, + "menu_order": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Menu order, used to custom sort products.", + "type": "integer" + }, + "meta_data": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + } + }, + "name": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent name.", + "type": "string" + }, + "parent_id": { + "validate_callback": "rest_validate_request_arg", + "sanitize_callback": "rest_sanitize_request_arg", + "description": "Product parent ID.", + "type": "integer" + } + }, + "required": false + }, + "type": { + "default": "variation", + "description": "Product type.", + "type": "string", + "enum": [ + "variation" + ], + "required": false + }, + "description": { + "description": "Variation description.", + "type": "string", + "required": false + }, + "sku": { + "description": "Stock Keeping Unit.", + "type": "string", + "required": false + }, + "global_unique_id": { + "description": "GTIN, UPC, EAN or ISBN.", + "type": "string", + "required": false + }, + "regular_price": { + "description": "Variation regular price.", + "type": "string", + "required": false + }, + "sale_price": { + "description": "Variation sale price.", + "type": "string", + "required": false + }, + "date_on_sale_from": { + "description": "Start date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_from_gmt": { + "description": "Start date of sale price, as GMT.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "date_on_sale_to_gmt": { + "description": "End date of sale price, in the site's timezone.", + "type": [ + "null", + "string" + ], + "required": false + }, + "status": { + "default": "publish", + "description": "Variation status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "virtual": { + "default": false, + "description": "If the variation is virtual.", + "type": "boolean", + "required": false + }, + "downloadable": { + "default": false, + "description": "If the variation is downloadable.", + "type": "boolean", + "required": false + }, + "downloads": { + "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" + ] + } + } + }, + "required": false + }, + "download_limit": { + "default": -1, + "description": "Number of times downloadable files can be downloaded after purchase.", + "type": "integer", + "required": false + }, + "download_expiry": { + "default": -1, + "description": "Number of days until access to downloadable files expires.", + "type": "integer", + "required": false + }, + "tax_status": { + "default": "taxable", + "description": "Tax status.", + "type": "string", + "enum": [ + "taxable", + "shipping", + "none" + ], + "required": false + }, + "tax_class": { + "description": "Tax class.", + "type": "string", + "required": false + }, + "manage_stock": { + "default": false, + "description": "Stock management at variation level.", + "type": "boolean", + "required": false + }, + "stock_quantity": { + "description": "Stock quantity.", + "type": "integer", + "required": false + }, + "stock_status": { + "default": "instock", + "description": "Controls the stock status of the product.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "backorders": { + "default": "no", + "description": "If managing stock, this controls if backorders are allowed.", + "type": "string", + "enum": [ + "no", + "notify", + "yes" + ], + "required": false + }, + "low_stock_amount": { + "description": "Low Stock amount for the variation.", + "type": [ + "integer", + "null" + ], + "required": false + }, + "weight": { + "description": "Variation weight (kg).", + "type": "string", + "required": false + }, + "dimensions": { + "description": "Variation dimensions.", + "type": "object", + "properties": { + "length": { + "description": "Variation length (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "width": { + "description": "Variation width (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + }, + "height": { + "description": "Variation height (cm).", + "type": "string", + "context": [ + "view", + "edit" + ] + } + }, + "required": false + }, + "shipping_class": { + "description": "Shipping class slug.", + "type": "string", + "required": false + }, + "image": { + "description": "Variation image data.", + "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": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_created_gmt": { + "description": "The date the image was created, as GMT.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified": { + "description": "The date the image was last modified, in the site's timezone.", + "type": [ + "null", + "string" + ], + "context": [ + "view", + "edit" + ], + "readonly": true + }, + "date_modified_gmt": { + "description": "The date the image was last modified, as GMT.", + "type": [ + "null", + "string" + ], + "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" + ] + } + }, + "required": false + }, + "attributes": { + "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" + ] + }, + "option": { + "description": "Selected attribute term name.", + "type": "string", + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "menu_order": { + "description": "Menu order, used to custom sort products.", + "type": "integer", + "required": false + }, + "meta_data": { + "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": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "context": [ + "view", + "edit" + ] + } + } + }, + "required": false + }, + "name": { + "description": "Product parent name.", + "type": "string", + "required": false + }, + "parent_id": { + "description": "Product parent ID.", + "type": "integer", + "required": false + } + } + } + ] + }, + "/wc-analytics/variations": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET", + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Search by similar product name, sku, or attribute value.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_after": { + "description": "Limit response to resources modified after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "modified_before": { + "description": "Limit response to resources modified before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "dates_are_gmt": { + "description": "Whether to consider GMT post dates when limiting response by published or modified date.", + "type": "boolean", + "default": false, + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific ids.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date", + "id", + "include", + "title", + "slug", + "modified", + "menu_order" + ], + "required": false + }, + "parent": { + "description": "Limit result set to those of particular parent IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "parent_exclude": { + "description": "Limit result set to all items except those of a particular parent ID.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "slug": { + "description": "Limit result set to products with a specific slug.", + "type": "string", + "required": false + }, + "status": { + "default": "any", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "any", + "future", + "trash", + "draft", + "pending", + "private", + "publish" + ], + "required": false + }, + "sku": { + "description": "Limit result set to products with specific SKU(s). Use commas to separate.", + "type": "string", + "required": false + }, + "on_sale": { + "description": "Limit result set to products on sale.", + "type": "boolean", + "required": false + }, + "min_price": { + "description": "Limit result set to products based on a minimum price.", + "type": "string", + "required": false + }, + "max_price": { + "description": "Limit result set to products based on a maximum price.", + "type": "string", + "required": false + }, + "include_meta": { + "default": [], + "description": "Limit meta_data to specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "exclude_meta": { + "default": [], + "description": "Ensure meta_data excludes specific keys.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "stock_status": { + "description": "Limit result set to products with specified stock status.", + "type": "string", + "enum": [ + "instock", + "outofstock", + "onbackorder" + ], + "required": false + }, + "has_price": { + "description": "Limit result set to products with or without price.", + "type": "boolean", + "required": false + }, + "attributes": { + "description": "Limit result set to products with specified attributes.", + "type": "array", + "items": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "Attribute slug." + }, + "term": { + "type": "string", + "description": "Attribute term." + }, + "terms": { + "type": "array", + "description": "Attribute terms." + } + } + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/variations" + } + ] + } + }, + "/wc-analytics/products/reviews": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to reviews published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date_gmt", + "enum": [ + "date", + "date_gmt", + "id", + "include", + "product" + ], + "required": false + }, + "reviewer": { + "description": "Limit result set to reviews assigned to specific user IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "reviewer_exclude": { + "description": "Ensure result set excludes reviews assigned to specific user IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "reviewer_email": { + "default": null, + "description": "Limit result set to that from a specific author email.", + "format": "email", + "type": "string", + "required": false + }, + "product": { + "default": [], + "description": "Limit result set to reviews assigned to specific product IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "status": { + "default": "approved", + "description": "Limit result set to reviews assigned a specific status.", + "type": "string", + "enum": [ + "all", + "hold", + "approved", + "spam", + "trash" + ], + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the product.", + "type": "integer", + "required": true + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "default": "approved", + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "type": "string", + "description": "Name of the reviewer.", + "required": true + }, + "reviewer_email": { + "type": "string", + "description": "Email of the reviewer.", + "required": true + }, + "review": { + "type": "string", + "description": "Review content.", + "required": true + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "search": { + "description": "Limit results to those matching a string.", + "type": "string", + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to reviews published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "exclude": { + "description": "Ensure result set excludes specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "include": { + "description": "Limit result set to specific IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date_gmt", + "enum": [ + "date", + "date_gmt", + "id", + "include", + "product" + ], + "required": false + }, + "reviewer": { + "description": "Limit result set to reviews assigned to specific user IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "reviewer_exclude": { + "description": "Ensure result set excludes reviews assigned to specific user IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "reviewer_email": { + "default": null, + "description": "Limit result set to that from a specific author email.", + "format": "email", + "type": "string", + "required": false + }, + "product": { + "default": [], + "description": "Limit result set to reviews assigned to specific product IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "status": { + "default": "approved", + "description": "Limit result set to reviews assigned a specific status.", + "type": "string", + "enum": [ + "all", + "hold", + "approved", + "spam", + "trash" + ], + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "product_id": { + "description": "Unique identifier for the product.", + "type": "integer", + "required": true + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "default": "approved", + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "type": "string", + "description": "Name of the reviewer.", + "required": true + }, + "reviewer_email": { + "type": "string", + "description": "Email of the reviewer.", + "required": true + }, + "review": { + "type": "string", + "description": "Review content.", + "required": true + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/reviews" + } + ] + } + }, + "/wc-analytics/products/reviews/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "product_id": { + "description": "Unique identifier for the product that the review belongs to.", + "type": "integer", + "required": false + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "description": "Reviewer name.", + "type": "string", + "required": false + }, + "reviewer_email": { + "description": "Reviewer email.", + "type": "string", + "format": "email", + "required": false + }, + "review": { + "description": "The content of the review.", + "type": "string", + "required": false + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "product_id": { + "description": "Unique identifier for the product that the review belongs to.", + "type": "integer", + "required": false + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "description": "Reviewer name.", + "type": "string", + "required": false + }, + "reviewer_email": { + "description": "Reviewer email.", + "type": "string", + "format": "email", + "required": false + }, + "review": { + "description": "The content of the review.", + "type": "string", + "required": false + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Whether to bypass trash and force deletion.", + "required": false + } + } + } + ] + }, + "/wc-analytics/products/reviews/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the product that the review belongs to.", + "type": "integer", + "required": false + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "description": "Reviewer name.", + "type": "string", + "required": false + }, + "reviewer_email": { + "description": "Reviewer email.", + "type": "string", + "format": "email", + "required": false + }, + "review": { + "description": "The content of the review.", + "type": "string", + "required": false + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "product_id": { + "description": "Unique identifier for the product that the review belongs to.", + "type": "integer", + "required": false + }, + "product_name": { + "description": "Product name.", + "type": "string", + "required": false + }, + "status": { + "description": "Status of the review.", + "type": "string", + "enum": [ + "approved", + "hold", + "spam", + "unspam", + "trash", + "untrash" + ], + "required": false + }, + "reviewer": { + "description": "Reviewer name.", + "type": "string", + "required": false + }, + "reviewer_email": { + "description": "Reviewer email.", + "type": "string", + "format": "email", + "required": false + }, + "review": { + "description": "The content of the review.", + "type": "string", + "required": false + }, + "rating": { + "description": "Review rating (0 to 5).", + "type": "integer", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/reviews/batch" + } + ] + } + }, + "/wc-analytics/products/low-in-stock": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "status": { + "default": "publish", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future" + ], + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "status": { + "default": "publish", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/low-in-stock" + } + ] + } + }, + "/wc-analytics/products/count-low-in-stock": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "status": { + "default": "publish", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future" + ], + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "status": { + "default": "publish", + "description": "Limit result set to products assigned a specific status.", + "type": "string", + "enum": [ + "draft", + "pending", + "private", + "publish", + "future" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/count-low-in-stock" + } + ] + } + }, + "/wc-analytics/settings/(?P[\\w-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + } + } + } + ] + }, + "/wc-analytics/settings/(?P[\\w-]+)/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "value": { + "description": "Setting value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "value": { + "description": "Setting value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "required": false + } + } + } + ] + }, + "/wc-analytics/settings/(?P[\\w-]+)/(?P[\\w-]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "GET", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "id": { + "description": "Unique identifier for the resource.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "id": { + "description": "Unique identifier for the resource.", + "type": "string", + "required": false + }, + "value": { + "description": "Setting value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "id": { + "description": "Unique identifier for the resource.", + "type": "string", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "group": { + "description": "Settings group ID.", + "type": "string", + "required": false + }, + "id": { + "description": "Unique identifier for the resource.", + "type": "string", + "required": false + }, + "value": { + "description": "Setting value.", + "type": [ + "null", + "object", + "string", + "number", + "boolean", + "integer", + "array" + ], + "required": false + } + } + } + ] + }, + "/wc-analytics/taxes": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "GET", + "POST" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "default": "asc", + "description": "Order sort attribute ascending or descending.", + "enum": [ + "asc", + "desc" + ], + "type": "string", + "required": false + }, + "orderby": { + "default": "order", + "description": "Sort collection by object attribute.", + "enum": [ + "id", + "order", + "priority" + ], + "type": "string", + "required": false + }, + "class": { + "description": "Sort by tax class.", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "type": "string", + "required": false + }, + "search": { + "description": "Search by similar tax code.", + "type": "string", + "required": false + }, + "include": { + "description": "Limit result set to items that have the specified rate ID(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "default": 1, + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "default": false, + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "default": true, + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "default": "standard", + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "offset": { + "description": "Offset the result set by a specific number of items.", + "type": "integer", + "required": false + }, + "order": { + "default": "asc", + "description": "Order sort attribute ascending or descending.", + "enum": [ + "asc", + "desc" + ], + "type": "string", + "required": false + }, + "orderby": { + "default": "order", + "description": "Sort collection by object attribute.", + "enum": [ + "id", + "order", + "priority" + ], + "type": "string", + "required": false + }, + "class": { + "description": "Sort by tax class.", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "type": "string", + "required": false + }, + "search": { + "description": "Search by similar tax code.", + "type": "string", + "required": false + }, + "include": { + "description": "Limit result set to items that have the specified rate ID(s) assigned.", + "type": "array", + "items": { + "type": "integer" + }, + "default": [], + "required": false + } + } + }, + { + "methods": [ + "POST" + ], + "args": { + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "default": 1, + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "default": false, + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "default": true, + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "default": "standard", + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/taxes" + } + ] + } + }, + "/wc-analytics/taxes/(?P[\\d]+)": { + "namespace": "wc-analytics", + "methods": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + }, + { + "methods": [ + "GET" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "DELETE" + ], + "args": { + "id": { + "description": "Unique identifier for the resource.", + "type": "integer", + "required": false + }, + "force": { + "default": false, + "type": "boolean", + "description": "Required to be true, as resource does not support trashing.", + "required": false + } + } + } + ] + }, + "/wc-analytics/taxes/batch": { + "namespace": "wc-analytics", + "methods": [ + "POST", + "PUT", + "PATCH", + "POST", + "PUT", + "PATCH" + ], + "endpoints": [ + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + }, + { + "methods": [ + "POST", + "PUT", + "PATCH" + ], + "args": { + "country": { + "description": "Country ISO 3166 code.", + "type": "string", + "required": false + }, + "state": { + "description": "State code.", + "type": "string", + "required": false + }, + "postcode": { + "description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", + "type": "string", + "required": false + }, + "city": { + "description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", + "type": "string", + "required": false + }, + "rate": { + "description": "Tax rate.", + "type": "string", + "required": false + }, + "name": { + "description": "Tax rate name.", + "type": "string", + "required": false + }, + "priority": { + "description": "Tax priority.", + "type": "integer", + "required": false + }, + "compound": { + "description": "Whether or not this is a compound rate.", + "type": "boolean", + "required": false + }, + "shipping": { + "description": "Whether or not this tax rate also gets applied to shipping.", + "type": "boolean", + "required": false + }, + "order": { + "description": "Indicates the order that will appear in queries.", + "type": "integer", + "required": false + }, + "class": { + "description": "Tax class.", + "type": "string", + "enum": [ + "standard", + "reduced-rate", + "zero-rate" + ], + "required": false + }, + "postcodes": { + "description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "cities": { + "description": "List of city names. Introduced in WooCommerce 5.3.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/taxes/batch" + } + ] + } + }, + "/wc-analytics/reports/products-example": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products-example" + } + ] + } + }, + "/wc-analytics/reports/products-example/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products-example/stats" + } + ] + } + }, + "/wc-analytics/reports/conversions": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "extended_info": { + "description": "Add additional info about each conversion to the report.", + "type": "boolean", + "default": false, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/conversions" + } + ] + } + }, + "/wc-analytics/reports/conversions/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "workflows": { + "description": "Limit result set to workflows assigned specific workflow IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "workflow_id" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/conversions/stats" + } + ] + } + }, + "/wc-analytics/reports/email-tracking/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "workflows": { + "description": "Limit result set to workflows assigned specific workflow IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "workflow_id" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/email-tracking/stats" + } + ] + } + }, + "/wc-analytics/reports/unsubscribers/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/unsubscribers/stats" + } + ] + } + }, + "/wc-analytics/reports/workflow-runs/stats": { + "namespace": "wc-analytics", + "methods": [ + "GET" + ], + "endpoints": [ + { + "methods": [ + "GET" + ], + "args": { + "context": { + "description": "Scope under which the request is made; determines fields present in response.", + "type": "string", + "enum": [ + "view", + "edit" + ], + "default": "view", + "required": false + }, + "page": { + "description": "Current page of the collection.", + "type": "integer", + "default": 1, + "minimum": 1, + "required": false + }, + "per_page": { + "description": "Maximum number of items to be returned in result set.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100, + "required": false + }, + "after": { + "description": "Limit response to resources published after a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "before": { + "description": "Limit response to resources published before a given ISO8601 compliant date.", + "type": "string", + "format": "date-time", + "required": false + }, + "order": { + "description": "Order sort attribute ascending or descending.", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "required": false + }, + "orderby": { + "description": "Sort collection by object attribute.", + "type": "string", + "default": "date", + "enum": [ + "date" + ], + "required": false + }, + "force_cache_refresh": { + "description": "Force retrieval of fresh data instead of from the cache.", + "type": "boolean", + "required": false + }, + "interval": { + "description": "Time interval to use for buckets in the returned data.", + "type": "string", + "default": "week", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "required": false + }, + "fields": { + "description": "Limit stats fields to the specified items.", + "type": "array", + "items": { + "type": "string" + }, + "required": false + }, + "workflows": { + "description": "Limit result set to workflows assigned specific workflow IDs.", + "type": "array", + "items": { + "type": "integer" + }, + "required": false + }, + "segmentby": { + "description": "Segment the response by additional constraint.", + "type": "string", + "enum": [ + "workflow_id" + ], + "required": false + } + } + } + ], + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/workflow-runs/stats" + } + ] + } + } + }, + "_links": { + "up": [ + { + "href": "https://example.com/wp-json/" + } + ] + } +} +``` diff --git a/source/includes/wc-analytics/_introduction.md b/source/includes/wc-analytics/_introduction.md new file mode 100644 index 00000000..1923d346 --- /dev/null +++ b/source/includes/wc-analytics/_introduction.md @@ -0,0 +1,269 @@ +# Introduction to Analytics REST API# + +The `/wc-analytics` API is specific to the WooCommerce Analytics feature introduced in WooCommerce `4.0`. It is used internally by WooCommerce to provide analytics data in the WooCommerce admin dashboard under the Analytics section. This namespace includes endpoints for accessing detailed reports on sales, revenue, orders, and other analytics metrics. + +Key characteristics of the `/wc-analytics` API include: + +- **Analytics-Focused**: Provides endpoints specifically for retrieving analytics and reporting data. +- **Public and Extensible**: While it powers the internal WooCommerce Analytics section, it is a public API available for developers to integrate with, allowing for custom reporting and analytics extensions. +- **Non-Versioned**: Currently, it does not use versioning, allowing WooCommerce developers to make changes as needed to support analytics features. + +To use the `/wc-analytics` API, you must enable WooCommerce Analytics in your store's settings. For more information about WooCommerce Analytics, see [WooCommerce Analytics documentation](https://woocommerce.com/document/woocommerce-analytics/). + +## Requirements ## + +To use the WooCommerce Analytics REST APIs, there are several requirements and considerations to ensure proper functionality and access. Here are the key requirements: + +- WooCommerce 4.0+. +- WordPress 5.3+. +- **Enable WooCommerce Analytics**: Analytics must be enabled in the WooCommerce settings. This feature is part of the WooCommerce Admin and should be activated to use the `/wc-analytics` API endpoints. +- 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*. + +By meeting these requirements, you can effectively use the WooCommerce Analytics REST APIs to access and manage analytics data in your WooCommerce store. For detailed setup and configuration instructions, you can refer to the WooCommerce REST API documentation and WooCommerce support pages. + + + +## 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 empty 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/v3?_jsonp=callback
+
+
+ +```shell +curl https://example.com/wp-json/wc/v3/products/tags/34?_jsonp=tagDetails \ + -u consumer_key:consumer_secret +``` + +```javascript +WooCommerce.get("products/tags/34?_jsonp=tagDetails") + .then((response) => { + console.log(response.data); + }) + .catch((error) => { + console.log(error.response.data); + }); +``` + +```php +get('products/tags/34', ['_jsonp' => 'tagDetails'])); ?> +``` + +```python +print(wcapi.get("products/tags/34?_jsonp=tagDetails").json()) +``` + +```ruby +woocommerce.get("products/tags/34", _jsonp: "tagDetails").parsed_response +``` + +> Response: + +``` +/**/tagDetails({"id":34,"name":"Leather Shoes","slug":"leather-shoes","description":"","count":0,"_links":{"self":[{"href":"https://example.com/wp-json/wc/v3/products/tags/34"}],"collection":[{"href":"https://example.com/wp-json/wc/v3/products/tags"}]}})% +``` + +## Errors ## + +Occasionally you might encounter errors when accessing the REST API. There are four possible types: + +| Error Code | Error Type | +|-----------------------------|-------------------------------------------------------------| +| `400 Bad Request` | Invalid request, e.g. using an unsupported HTTP method | +| `401 Unauthorized` | Authentication or permission error, e.g. incorrect API keys | +| `404 Not Found` | Requests to resources that don't exist or are missing | +| `500 Internal Server Error` | Server error | + +> WP REST API error example: + +```json +{ + "code": "rest_no_route", + "message": "No route was found matching the URL and request method", + "data": { + "status": 404 + } +} +``` + +> WooCommerce REST API error example: + +```json +{ + "code": "woocommerce_rest_term_invalid", + "message": "Resource doesn't exist.", + "data": { + "status": 404 + } +} +``` + +Errors return both an appropriate HTTP status code and response object which contains a `code`, `message` and `data` attribute. + +## Parameters ## + +Almost all endpoints accept optional parameters which can be passed as a HTTP query string parameter, e.g. `GET /orders?status=completed`. All parameters are documented along each endpoint. + +## Pagination ## + +Requests that return multiple items will be paginated to 10 items by default. This default can be changed by the site administrator by changing the `posts_per_page` option. Alternatively the items per page can be specified with the `?per_page` parameter: + +`GET /orders?per_page=15` + +You can specify further pages with the `?page` parameter: + +`GET /orders?page=2` + +You may also specify the offset from the first resource using the `?offset` parameter: + +`GET /orders?offset=5` + +Page number is 1-based and omitting the `?page` parameter will return the first page. + +The total number of resources and pages are always included in the `X-WP-Total` and `X-WP-TotalPages` HTTP headers. + +### Link Header ### + +Pagination info is included in the [Link Header](http://tools.ietf.org/html/rfc5988). It's recommended that you follow these values instead of building your own URLs where possible. + +``` +Link: ; rel="next", +; rel="last"` +``` + +The possible `rel` values are: + +| Value | Description | +|---------|----------------------------------------------------------| +| `next` | Shows the URL of the immediate next page of results. | +| `last` | Shows the URL of the last page of results. | +| `first` | Shows the URL of the first page of results. | +| `prev` | Shows the URL of the immediate previous page of results. | + +## Libraries and Tools ## + +### Official libraries ### + +- [JavaScript](https://www.npmjs.com/package/@woocommerce/woocommerce-rest-api) Library +- [PHP](https://packagist.org/packages/automattic/woocommerce) Library +- [Python](https://pypi.python.org/pypi/WooCommerce) Library +- [Ruby](https://rubygems.org/gems/woocommerce_api) Library + +**Please note that to access the `wc-analytics` namespace, the version must be specified as `wc-analytics` in the libraries.** + +```javascript +// Install: +// npm install --save @woocommerce/woocommerce-rest-api + +// Setup: +const WooCommerceRestApi = require("@woocommerce/woocommerce-rest-api").default; +// import WooCommerceRestApi from "@woocommerce/woocommerce-rest-api"; // Supports ESM + +const WooCommerce = new WooCommerceRestApi({ + url: 'http://example.com', // Your store URL + consumerKey: 'consumer_key', // Your consumer key + consumerSecret: 'consumer_secret', // Your consumer secret + version: 'wc-analytics' // WooCommerce WP REST API version +}); +``` + +```php + true, // Enable the WP REST API integration + 'version' => 'wc-analytics' // WooCommerce WP REST API version + ] +); +?> +``` + +```python +# Install: +# pip install woocommerce + +# Setup: +from woocommerce import API + +wcapi = API( + url="http://example.com", # Your store URL + consumer_key="consumer_key", # Your consumer key + consumer_secret="consumer_secret", # Your consumer secret + wp_api=True, # Enable the WP REST API integration + version="wc-analytics" # WooCommerce WP REST API version +) +``` + +```ruby +# Install: +# gem install woocommerce_api + +# Setup: +require "woocommerce_api" + +woocommerce = WooCommerce::API.new( + "https://example.com", # Your store URL + "consumer_key", # Your consumer key + "consumer_secret", # Your consumer secret + { + wp_api: true, # Enable the WP REST API integration + version: "wc-analytics" # WooCommerce WP REST API version + } +) +``` + + + +### Third party libraries ### + +- [Java](https://github.com/icoderman/wc-api-java) Library +- [.NET](https://github.com/XiaoFaye/WooCommerce.NET) Library +- [Android](https://github.com/gilokimu/WooDroid) Library + + + +### Tools ### + +Some useful tools you can use to access the API include: + +- [Insomnia](https://insomnia.rest) - Cross-platform GraphQL and REST client, available for Mac, Windows, and Linux. +- [Postman](https://www.postman.com/) - Cross-platform REST client, available for Mac, Windows, and Linux. +- [RequestBin](https://pipedream.com/requestbin) - Allows you test webhooks. + +## Learn more ## + +Learn more about the REST API checking the official WordPress REST API documentation. diff --git a/source/includes/wc-analytics/_reports.md b/source/includes/wc-analytics/_reports.md new file mode 100644 index 00000000..11f096ce --- /dev/null +++ b/source/includes/wc-analytics/_reports.md @@ -0,0 +1,731 @@ +# Analytics Reports # + +The reports API enables you to view analytics data on products, sales, revenue, orders, and more. + +## List all the reports endpoints ## + +This API helps you to list all the endpoints regarding reports. + +### HTTP request ### + +
+
+ GET +
/wp-json/wc-analytics/reports
+
+
+ +> Example of how to list all the enpoints regarding WC Analytics reports: + +```shell +curl https://example.com/wp-json/wc-analytics/reports \ + -u consumer_key:consumer_secret +``` + +```javascript +WooCommerce.get("reports") + .then((response) => { + console.log(response.data); + }) + .catch((error) => { + console.log(error.response.data); + }); +``` + +```php +get('reports')); +?> +``` + +```python +print(wcapi.get("reports").json()) +``` + +```ruby +woocommerce.post("reports").parsed_response +``` + +> JSON response example: + +```json +[ + { + "slug": "performance-indicators", + "description": "Batch endpoint for getting specific performance indicators from `stats` endpoints.", + "path": "/wc-analytics/reports/performance-indicators", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/performance-indicators" + } + ], + "report": [ + { + "href": "/analytics/performance-indicators" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "revenue/stats", + "description": "Stats about revenue.", + "path": "/wc-analytics/reports/revenue/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/revenue/stats" + } + ], + "report": [ + { + "href": "/analytics/revenue" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "orders/stats", + "description": "Stats about orders.", + "path": "/wc-analytics/reports/orders/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/orders/stats" + } + ], + "report": [ + { + "href": "/analytics/orders" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "products", + "description": "Products detailed reports.", + "path": "/wc-analytics/reports/products", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products" + } + ], + "report": [ + { + "href": "/analytics/products" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "products/stats", + "description": "Stats about products.", + "path": "/wc-analytics/reports/products/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/products/stats" + } + ], + "report": [ + { + "href": "/analytics/products" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "variations", + "description": "Variations detailed reports.", + "path": "/wc-analytics/reports/variations", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/variations" + } + ], + "report": [ + { + "href": "/analytics/variations" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "variations/stats", + "description": "Stats about variations.", + "path": "/wc-analytics/reports/variations/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/variations/stats" + } + ], + "report": [ + { + "href": "/analytics/variations" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "categories", + "description": "Product categories detailed reports.", + "path": "/wc-analytics/reports/categories", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/categories" + } + ], + "report": [ + { + "href": "/analytics/categories" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "categories/stats", + "description": "Stats about product categories.", + "path": "/wc-analytics/reports/categories/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/categories/stats" + } + ], + "report": [ + { + "href": "/analytics/categories" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "coupons", + "description": "Coupons detailed reports.", + "path": "/wc-analytics/reports/coupons", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/coupons" + } + ], + "report": [ + { + "href": "/analytics/coupons" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "coupons/stats", + "description": "Stats about coupons.", + "path": "/wc-analytics/reports/coupons/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/coupons/stats" + } + ], + "report": [ + { + "href": "/analytics/coupons" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "taxes", + "description": "Taxes detailed reports.", + "path": "/wc-analytics/reports/taxes", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/taxes" + } + ], + "report": [ + { + "href": "/analytics/taxes" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "taxes/stats", + "description": "Stats about taxes.", + "path": "/wc-analytics/reports/taxes/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/taxes/stats" + } + ], + "report": [ + { + "href": "/analytics/taxes" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "downloads", + "description": "Product downloads detailed reports.", + "path": "/wc-analytics/reports/downloads", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/downloads" + } + ], + "report": [ + { + "href": "/analytics/downloads" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "downloads/files", + "description": "Product download files detailed reports.", + "path": "/wc-analytics/reports/downloads/files", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/downloads/files" + } + ], + "report": [ + { + "href": "/analytics/downloads/files" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "downloads/stats", + "description": "Stats about product downloads.", + "path": "/wc-analytics/reports/downloads/stats", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/downloads/stats" + } + ], + "report": [ + { + "href": "/analytics/downloads" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + }, + { + "slug": "customers", + "description": "Customers detailed reports.", + "path": "/wc-analytics/reports/customers", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports/customers" + } + ], + "report": [ + { + "href": "/analytics/customers" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc-analytics/reports" + } + ] + } + } +] +``` + +## Products ## + +This API lets you retrieve and view the product item sales, net revenue, and the corredsponding orders. + +### Products Reports properties ### + +| Attribute | Type | Description | +|-----------------|---------|----------------------------------------------------------------------------------------------------------------------------| +| `product_id` | integer | Unique identifier for the resource. read-only | +| `items_sold` | integer | Number of items sold. read-only | +| `net_revenue` | integer | Total Net sales of all items sold. read-only | +| `orders_count` | integer | Number of orders product appeared in. read-only | +| `extended_info` | object | Extended info for the product. See [Product Reports - Extended Info properties](#product-reports-extended-info-properties) | + +#### Product Reports - Extended Info properties #### + +| Attribute | Type | Description | +|--------------------|-------- |--------------------------------------------| +| `name` | string | Product name. | +| `price` | integer | Product price. | +| `image` | string | Product image. | +| `permalink` | string | Product link. | +| `category_ids` | array | Product category IDs. | +| `stock_status` | string | Product inventory status. | +| `stock_quantity` | integer | Product inventory quantity. | +| `low_stock_amount` | integer | Product inventory threshold for low stock. | +| `variations` | array | Product variations IDs. | +| `sku` | string | Product SKU. | + +### HTTP request ### + +
+
+ GET +
/wp-json/wc-analytics/reports/products
+
+
+ +```shell +curl https://example.com/wp-json/wc-analytics/reports/products \ + -u consumer_key:consumer_secret +``` + +```javascript +WooCommerce.get("reports/products") + .then((response) => { + console.log(response.data); + }) + .catch((error) => { + console.log(error.response.data); + }); +``` + +```php +get('reports/products')); ?> +``` + +```python +print(wcapi.get("reports/products").json()) +``` + +```ruby +woocommerce.get("reports/products").parsed_response +``` + +> JSON response example: + +```json +[ + { + "product_id": 62, + "items_sold": 1, + "net_revenue": 18, + "orders_count": 1, + "extended_info": {}, + "_links": { + "product": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/62" + } + ] + } + }, + { + "product_id": 63, + "items_sold": 1, + "net_revenue": 55, + "orders_count": 1, + "extended_info": {}, + "_links": { + "product": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/63" + } + ] + } + }, + { + "product_id": 64, + "items_sold": 1, + "net_revenue": 16, + "orders_count": 1, + "extended_info": {}, + "_links": { + "product": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/64" + } + ] + } + }, + { + "product_id": 79, + "items_sold": 1, + "net_revenue": 18, + "orders_count": 1, + "extended_info": {}, + "_links": { + "product": [ + { + "href": "https://example.com/wp-json/wc-analytics/products/79" + } + ] + } + } +] +``` + +#### Available parameters #### + +| Parameter | Type | Description | +|-----------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `context` | string | cope under which the request is made; determines fields present in response. Options: view and edit. Default is view. | +| `page` | integer | Current page of the collection. Default is `1`. | +| `per_page` | integer | Maximum number of items to be returned in result set. Default is `10`. | +| `after` | string | Limit response to resources published after a given ISO8601 compliant date. | +| `before` | string | Limit response to resources published before a given ISO8601 compliant date. | +| `order` | string | Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`. | +| `orderby` | string | Sort collection by object attribute. Options: `date`, `net_revenue`, `orders_count`, `items_sold`, `product_name`, `variations`, `sku`. Default is `date`. | +| `force_cache_refresh` | boolean | Force retrieval of fresh data instead of from the cache. | +| `categories` | array | Limit result to items from the specified categories. | +| `products` | array | Limit result to items with specified product ids. | +| `match` | string | Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: `status_is`, `status_is_not`, `product_includes`, `product_excludes`, `coupon_includes`, `coupon_excludes`, `customer`, `categorie`. Options: `all`, `any`. Default is `all`. | +| `extended_info` | boolean | Add additional piece of info about each product to the report. Default is `false`. | + +## Products Stats ### + +This API helps you to view all the products. + +### Products Stats Reports properties ### + +| Attribute | Type | Description | +|-------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `totals` | object | Totals data. See [Products Stats Reports - Totals properties](#products-stats-reports-totals-properties) read-only | +| `intervals` | object | Reports data grouped by intervals. See [Products Stats Reports - Intervals properties](#products-stats-reports-intervals-properties) read-only | + +#### Products Stats Reports - Totals properties #### + +| Attribute | Type | Description | +|----------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `items_sold` | integer | Number of product items sold. read-only | +| `net_revenue` | integer | Net sales. read-only | +| `orders_count` | integer | Number of orders. read-only | +| `segments` | array | Reports data grouped by segment condition. See [Products Stats Reports - Segments properties](#products-stats-reports-segments-properties) read-only | + + +##### Products Stats Reports - Segments properties ##### + +| Attribute | Type | Description | +|--------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `segment_id` | integer | Segment identificator. read-only | +| `subtotals` | object | Interval subtotals. See [Products Stats Reports - Totals properties](#products-stats-reports-totals-properties), but without `segments` atttribute. read-only | + +> Segments properties example + +```json +[ + { + "segment_id": 123, + "subtotals": { + "iitems_sold": 12, + "net_revenue": 110, + "orders_count": 3, + } + } +] +``` + +#### Products Stats Reports - Intervals properties #### + +| Attribute | Type | Description | +|------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `interval` | string | Type of interval. read-only | +| `date_start` | string | The date the report start, in the site's timezone. read-only | +| `date_start_gmt` | string | The date the report start, as GMT. read-only | +| `date_end` | string | The date the report end, in the site's timezone. read-only | +| `date_end_gmt` | string | The date the report end, as GMT. read-only | +| `subtotals` | object | Interval subtotals. See [Products Stats Reports - Totals properties](#products-stats-reports-totals-properties). read-only | + + +### HTTP request ### + +
+
+ GET +
/wp-json/wc-analytics/reports/products/stats
+
+
+ +```shell +curl https://example.com/wp-json/wc-analytics/reports/products/stats \ + -u consumer_key:consumer_secret +``` + +```javascript +WooCommerce.get("reports/products/stats") + .then((response) => { + console.log(response.data); + }) + .catch((error) => { + console.log(error.response.data); + }); +``` + +```php +get('reports/products/stats')); ?> +``` + +```python +print(wcapi.get("reports/products/stats").json()) +``` + +```ruby +woocommerce.get("reports/products/stats").parsed_response +``` + +> JSON response example: + +```json +{ + "totals": { + "items_sold": 0, + "net_revenue": 0, + "orders_count": 0, + "products_count": 0, + "variations_count": 0, + "segments": [] + }, + "intervals": [ + { + "interval": "2024-33", + "date_start": "2024-08-12 00:00:00", + "date_start_gmt": "2024-08-12 00:00:00", + "date_end": "2024-08-13 08:04:37", + "date_end_gmt": "2024-08-13 08:04:37", + "subtotals": { + "items_sold": 0, + "net_revenue": 0, + "orders_count": 0, + "products_count": 0, + "variations_count": 0, + "segments": [] + } + }, + { + "interval": "2024-32", + "date_start": "2024-08-06 08:04:37", + "date_start_gmt": "2024-08-06 08:04:37", + "date_end": "2024-08-11 23:59:59", + "date_end_gmt": "2024-08-11 23:59:59", + "subtotals": { + "items_sold": 0, + "net_revenue": 0, + "orders_count": 0, + "products_count": 0, + "variations_count": 0, + "segments": [] + } + } + ] +} +``` + +#### Available parameters #### + +| Parameter | Type | Description | +|-----------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `context` | string | cope under which the request is made; determines fields present in response. Options: view and edit. Default is view. | +| `page` | integer | Current page of the collection. Default is `1`. | +| `per_page` | integer | Maximum number of items to be returned in result set. Default is `10`. | +| `after` | string | Limit response to resources published after a given ISO8601 compliant date. | +| `before` | string | Limit response to resources published before a given ISO8601 compliant date. | +| `order` | string | Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`. | +| `orderby` | string | Sort collection by object attribute. Options: `date`, `coupons`, `refunds`, `shipping`, `taxes`, `net_revenue`, `orders_count`, `items_sold`. Default is `date`. | +| `force_cache_refresh` | boolean | Force retrieval of fresh data instead of from the cache. | +| `categories` | array | Limit result to items from the specified categories. | +| `products` | array | Limit result to items with specified product ids. | +| `variations` | array | Limit result to items with specified variations ID. | +| `segmentby` | string | Segment the response by additional constraint. Options: `product`, `category`, `variation`. | +| `fields` | array | Limit stats fields to the specified items. | +| `interval` | string | Time interval to use for buckets in the returned data. Options: `hour`, `day`, `week`, `month`, `quarter`, `year`. | + diff --git a/source/includes/wp-api-v1/_introduction.md b/source/includes/wp-api-v1/_introduction.md index d64cb221..f9096843 100644 --- a/source/includes/wp-api-v1/_introduction.md +++ b/source/includes/wp-api-v1/_introduction.md @@ -43,7 +43,7 @@ Some general information about responses: * 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. +* Blank fields are generally included as `null` or empty string instead of being omitted. ### JSONP Support ### diff --git a/source/includes/wp-api-v1/_webhooks.md b/source/includes/wp-api-v1/_webhooks.md index e184870a..79220392 100644 --- a/source/includes/wp-api-v1/_webhooks.md +++ b/source/includes/wp-api-v1/_webhooks.md @@ -54,7 +54,7 @@ Delivery logs can be fetched through the REST API endpoint or in code using `WC_ ### Visual interface ### -You can find the Webhooks interface going to "WooCommerce" > "Settings" > "API" > "Webhooks", see our [Visual Webhooks docs](https://docs.woocommerce.com/document/webhooks/) for more details. +You can find the Webhooks interface going to "WooCommerce" > "Settings" > "API" > "Webhooks", see our [Visual Webhooks docs](https://woocommerce.com/document/webhooks/) for more details. ## Webhook properties ## diff --git a/source/includes/wp-api-v2/_introduction.md b/source/includes/wp-api-v2/_introduction.md index 80324cd0..f69e8e23 100644 --- a/source/includes/wp-api-v2/_introduction.md +++ b/source/includes/wp-api-v2/_introduction.md @@ -44,7 +44,7 @@ Some general information about responses: * 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. +* Blank fields are generally included as `null` or empty string instead of being omitted. ### JSONP Support ### diff --git a/source/includes/wp-api-v2/_webhooks.md b/source/includes/wp-api-v2/_webhooks.md index 6bc38fe3..df42e195 100644 --- a/source/includes/wp-api-v2/_webhooks.md +++ b/source/includes/wp-api-v2/_webhooks.md @@ -55,7 +55,7 @@ Delivery logs can be fetched through the REST API endpoint or in code using `WC_ ### Visual interface ### -You can find the Webhooks interface going to "WooCommerce" > "Settings" > "API" > "Webhooks", see our [Visual Webhooks docs](https://docs.woocommerce.com/document/webhooks/) for more details. +You can find the Webhooks interface going to "WooCommerce" > "Settings" > "API" > "Webhooks", see our [Visual Webhooks docs](https://woocommerce.com/document/webhooks/) for more details. ## Webhook properties ## diff --git a/source/includes/wp-api-v3/_introduction.md b/source/includes/wp-api-v3/_introduction.md index 4eb9f4d8..5667300a 100644 --- a/source/includes/wp-api-v3/_introduction.md +++ b/source/includes/wp-api-v3/_introduction.md @@ -12,6 +12,13 @@ The following table shows API versions present in each major version of WooComme | `v2` | 3.0.x or later | 4.4 or later | [v2 docs](wp-api-v2.html) | | `v1` | 2.6.x or later | 4.4 or later | [v1 docs](wp-api-v1.html) | +We also have a set of analytics endpoints, which currently exist under their own namespace (`wc-analytics`): + +| API Version | WC Version | WP Version | Documentation | +|----------------|----------------|--------------|-------------------------------------| +| `wc-analytics` | 4.0.x or later | 5.3 or later | [Analytics docs](wc-analytics.html) | + + Prior to 2.6, WooCommerce had a REST API separate from WordPress which is now known as the legacy API. You can find the documentation for the legacy API separately. | API Version | WC Version | WP Version | Documentation | @@ -45,7 +52,7 @@ Some general information about responses: * 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. +* Blank fields are generally included as `null` or empty string instead of being omitted. ### JSONP Support ### diff --git a/source/includes/wp-api-v3/_webhooks.md b/source/includes/wp-api-v3/_webhooks.md index 69ab75f5..85da0752 100644 --- a/source/includes/wp-api-v3/_webhooks.md +++ b/source/includes/wp-api-v3/_webhooks.md @@ -53,7 +53,7 @@ Delivery logs can be accessed in "WooCommerce" > "Status" > "Logs". ### Visual interface ### -You can find the Webhooks interface going to "WooCommerce" > "Settings" > "Advanced" > "Webhooks", see our [Visual Webhooks docs](https://docs.woocommerce.com/document/webhooks/) for more details. +You can find the Webhooks interface going to "WooCommerce" > "Settings" > "Advanced" > "Webhooks", see our [Visual Webhooks docs](https://woocommerce.com/document/webhooks/) for more details. ## Webhook properties ## diff --git a/source/index.html.md b/source/index.html.md index 28684b94..898ab932 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -9,11 +9,11 @@ language_tabs: - ruby: Ruby toc_footers: - - We're hiring! + - We're hiring! - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate diff --git a/source/v1.html.md b/source/v1.html.md index f416a49b..c91d10a4 100644 --- a/source/v1.html.md +++ b/source/v1.html.md @@ -8,7 +8,7 @@ toc_footers: - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate diff --git a/source/v2.html.md b/source/v2.html.md index 097ef4c3..2fc5a709 100644 --- a/source/v2.html.md +++ b/source/v2.html.md @@ -12,7 +12,7 @@ toc_footers: - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate diff --git a/source/v3.html.md b/source/v3.html.md index 105fa238..9b490e53 100644 --- a/source/v3.html.md +++ b/source/v3.html.md @@ -12,7 +12,7 @@ toc_footers: - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate diff --git a/source/wc-analytics.html.md b/source/wc-analytics.html.md new file mode 100644 index 00000000..70f1ec8a --- /dev/null +++ b/source/wc-analytics.html.md @@ -0,0 +1,27 @@ +--- +title: WooCommerce REST API Documentation - WooCommerce Analytics + +language_tabs: + - shell: cURL + - javascript: Node.js + - php: PHP + - python: Python + - ruby: Ruby + +toc_footers: + - We're hiring! + - Contributing to WC REST API Docs + - REST API Source on GitHub + - REST API Issues + - WooCommerce Documentation + - WooCommerce Repository + - Documentation Powered by Slate + +includes: + - wc-analytics/introduction + - wc-analytics/authentication + - wc-analytics/index + - wc-analytics/reports + +search: false +--- diff --git a/source/wp-api-v1.html.md b/source/wp-api-v1.html.md index 6d1fdd9f..af827e15 100644 --- a/source/wp-api-v1.html.md +++ b/source/wp-api-v1.html.md @@ -12,7 +12,7 @@ toc_footers: - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate diff --git a/source/wp-api-v2.html.md b/source/wp-api-v2.html.md index 49743355..77fae818 100644 --- a/source/wp-api-v2.html.md +++ b/source/wp-api-v2.html.md @@ -12,7 +12,7 @@ toc_footers: - Contributing to WC REST API Docs - REST API Source on GitHub - REST API Issues - - WooCommerce Documentation + - WooCommerce Documentation - WooCommerce Repository - Documentation Powered by Slate