66455 lines
2.4 MiB
Executable file
66455 lines
2.4 MiB
Executable file
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "Haiku Atelier API",
|
|
"description": "",
|
|
"version": "6.6.1",
|
|
"contact": { "name": "Haiku Atelier", "url": "https:/haikuatelier.fr.ddev.site", "email": "contact@gcch.fr" }
|
|
},
|
|
"servers": [{ "url": "https:/haikuatelier.fr.ddev.site/wp-json" }],
|
|
"tags": [
|
|
{ "name": "wc/v3", "description": "" },
|
|
{ "name": "wp-openapi/v1", "description": "" },
|
|
{ "name": "jetpack/v4", "description": "" },
|
|
{ "name": "wc-admin", "description": "" },
|
|
{ "name": "wc-analytics", "description": "" },
|
|
{ "name": "wc/store", "description": "" },
|
|
{ "name": "wc/store/v1", "description": "" },
|
|
{ "name": "wc/private", "description": "" },
|
|
{ "name": "wc/v1", "description": "" },
|
|
{ "name": "wc/v2", "description": "" },
|
|
{ "name": "wc-telemetry", "description": "" },
|
|
{ "name": "wccom-site/v3", "description": "" },
|
|
{ "name": "carbon-fields/v1", "description": "" },
|
|
{ "name": "wp/v2", "description": "" },
|
|
{ "name": "wp-site-health/v1", "description": "" },
|
|
{ "name": "wp-block-editor/v1", "description": "" }
|
|
],
|
|
"security": [],
|
|
"components": {
|
|
"schemas": {
|
|
"shop_coupon": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shop_coupon",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the object.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"code": { "description": "Coupon code.", "type": "string", "context": ["view", "edit"] },
|
|
"amount": {
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"status": {
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_created": {
|
|
"description": "The date the coupon was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the coupon was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the coupon was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified_gmt": {
|
|
"description": "The date the coupon was last modified, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"discount_type": {
|
|
"description": "Determines the type of discount that will be applied.",
|
|
"type": "string",
|
|
"default": "fixed_cart",
|
|
"enum": ["percent", "fixed_cart", "fixed_product"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"description": { "description": "Coupon description.", "type": "string", "context": ["view", "edit"] },
|
|
"date_expires": {
|
|
"description": "The date the coupon expires, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_expires_gmt": {
|
|
"description": "The date the coupon expires, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"usage_count": {
|
|
"description": "Number of times the coupon has been used already.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"individual_use": {
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"product_ids": {
|
|
"description": "List of product IDs the coupon can be used on.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"excluded_product_ids": {
|
|
"description": "List of product IDs the coupon cannot be used on.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"usage_limit": {
|
|
"description": "How many times the coupon can be used in total.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"usage_limit_per_user": {
|
|
"description": "How many times the coupon can be used per customer.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"description": "Max number of items in the basket the coupon can be applied to.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"free_shipping": {
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"product_categories": {
|
|
"description": "List of category IDs the coupon applies to.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"excluded_product_categories": {
|
|
"description": "List of category IDs the coupon does not apply to.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"exclude_sale_items": {
|
|
"description": "If true, this coupon will not be applied to items that have sale prices.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"minimum_amount": {
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"maximum_amount": {
|
|
"description": "Maximum order amount allowed when using the coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"email_restrictions": {
|
|
"description": "List of email addresses that can use this coupon.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"used_by": {
|
|
"description": "List of user IDs (or guest email addresses) that have used the coupon.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"batch": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "batch",
|
|
"type": "object",
|
|
"properties": {
|
|
"create": {
|
|
"description": "List of created resources.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": { "type": "object" }
|
|
},
|
|
"update": {
|
|
"description": "List of updated resources.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": { "type": "object" }
|
|
},
|
|
"delete": {
|
|
"description": "List of deleted resources.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": { "type": "integer" }
|
|
}
|
|
}
|
|
},
|
|
"customer_download": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "customer_download",
|
|
"type": "object",
|
|
"properties": {
|
|
"download_id": { "description": "Download ID.", "type": "string", "context": ["view"], "readonly": true },
|
|
"download_url": {
|
|
"description": "Download file URL.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"product_id": {
|
|
"description": "Downloadable product ID.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"product_name": { "description": "Product name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"download_name": {
|
|
"description": "Downloadable file name.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"order_id": { "description": "Order ID.", "type": "integer", "context": ["view"], "readonly": true },
|
|
"order_key": { "description": "Order key.", "type": "string", "context": ["view"], "readonly": true },
|
|
"downloads_remaining": {
|
|
"description": "Number of downloads remaining.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"access_expires": {
|
|
"description": "The date when download access expires, in the site's timezone.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"access_expires_gmt": {
|
|
"description": "The date when download access expires, as GMT.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"file": {
|
|
"description": "File details.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"name": { "description": "File name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"file": { "description": "File URL.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"customer": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "customer",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "The date the customer was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the customer was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the customer was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified_gmt": {
|
|
"description": "The date the customer was last modified, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"email": {
|
|
"description": "The email address for the customer.",
|
|
"type": "string",
|
|
"format": "email",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"first_name": { "description": "Customer first name.", "type": "string", "context": ["view", "edit"] },
|
|
"last_name": { "description": "Customer last name.", "type": "string", "context": ["view", "edit"] },
|
|
"role": { "description": "Customer role.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"username": { "description": "Customer login name.", "type": "string", "context": ["view", "edit"] },
|
|
"password": { "description": "Customer password.", "type": "string", "context": ["edit"] },
|
|
"billing": {
|
|
"description": "List of billing address data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"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 county, state, province or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"postcode": { "description": "Postal code.", "type": "string", "context": ["view", "edit"] },
|
|
"country": { "description": "ISO code of the country.", "type": "string", "context": ["view", "edit"] },
|
|
"email": {
|
|
"description": "Email address.",
|
|
"type": "string",
|
|
"format": "email",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"phone": { "description": "Phone number.", "type": "string", "context": ["view", "edit"] }
|
|
}
|
|
},
|
|
"shipping": {
|
|
"description": "List of shipping address data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"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 county, state, province or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"postcode": { "description": "Postal code.", "type": "string", "context": ["view", "edit"] },
|
|
"country": { "description": "ISO code of the country.", "type": "string", "context": ["view", "edit"] }
|
|
}
|
|
},
|
|
"is_paying_customer": {
|
|
"description": "Is the customer a paying customer?",
|
|
"type": "bool",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"description": "Quantity of orders made by the customer.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_spent": {
|
|
"description": "Total amount spent.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"avatar_url": {
|
|
"description": "Avatar URL.",
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"order_note": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "order_note",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "The date the order note was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the order note was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"note": { "description": "Order note content.", "type": "string", "context": ["view", "edit"] },
|
|
"customer_note": {
|
|
"description": "If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"shop_order_refund": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shop_order_refund",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "The date the order refund was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the order refund was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"amount": { "description": "Refund amount.", "type": "string", "context": ["view", "edit"] },
|
|
"reason": { "description": "Reason for refund.", "type": "string", "context": ["view", "edit"] },
|
|
"refunded_by": {
|
|
"description": "User ID of user who created the refund.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"refunded_payment": {
|
|
"description": "If the payment was refunded via the API.",
|
|
"type": "boolean",
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
},
|
|
"line_items": {
|
|
"description": "Line items data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"name": {
|
|
"description": "Product name.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"product_id": {
|
|
"description": "Product ID.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"variation_id": {
|
|
"description": "Variation ID, if applicable.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity ordered.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_class": {
|
|
"description": "Tax class of product.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotal": {
|
|
"description": "Line subtotal (before discounts).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"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"],
|
|
"readonly": true
|
|
},
|
|
"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"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Meta ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"key": {
|
|
"description": "Meta key.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Meta value.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sku": {
|
|
"description": "Product SKU.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Product price.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tax_lines": {
|
|
"description": "Tax lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"rate_code": {
|
|
"description": "Tax rate code.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rate_id": {
|
|
"description": "Tax rate ID",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "Tax rate label.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"compound": {
|
|
"description": "Show if is a compound tax rate.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_total": {
|
|
"description": "Tax total (not including shipping taxes).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"shipping_tax_total": {
|
|
"description": "Shipping 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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_lines": {
|
|
"description": "Shipping lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"method_title": {
|
|
"description": "Shipping method name.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"method_id": { "description": "Shipping method ID.", "type": "mixed", "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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"fee_lines": {
|
|
"description": "Fee lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Fee name.", "type": "mixed", "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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"api_refund": {
|
|
"description": "When true, the payment gateway API is used to generate the refund.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"shop_order": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shop_order",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent_id": { "description": "Parent order ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"number": { "description": "Order number.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"order_key": { "description": "Order key.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"created_via": {
|
|
"description": "Shows where the order was created.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"version": {
|
|
"description": "Version of WooCommerce which last updated the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "Order status.",
|
|
"type": "string",
|
|
"default": "pending",
|
|
"enum": [
|
|
"auto-draft",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"currency": {
|
|
"description": "Currency the order was created with, in ISO format.",
|
|
"type": "string",
|
|
"default": "EUR",
|
|
"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"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_created": {
|
|
"description": "The date the order was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the order was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the order was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified_gmt": {
|
|
"description": "The date the order was last modified, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"discount_total": {
|
|
"description": "Total discount amount for the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"discount_tax": {
|
|
"description": "Total discount tax amount for the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"shipping_total": {
|
|
"description": "Total shipping amount for the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"shipping_tax": {
|
|
"description": "Total shipping tax amount for the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"cart_tax": {
|
|
"description": "Sum of line item taxes only.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total": { "description": "Grand total.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"total_tax": {
|
|
"description": "Sum of all taxes.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"prices_include_tax": {
|
|
"description": "True the prices included tax during checkout.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_id": {
|
|
"description": "User ID who owns the order. 0 for guests.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"customer_ip_address": {
|
|
"description": "Customer's IP address.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_user_agent": {
|
|
"description": "User agent of the customer.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_note": {
|
|
"description": "Note left by customer during checkout.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"billing": {
|
|
"description": "Billing address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"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 county, 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"] }
|
|
}
|
|
},
|
|
"shipping": {
|
|
"description": "Shipping address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"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 county, 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"]
|
|
}
|
|
}
|
|
},
|
|
"payment_method": { "description": "Payment method ID.", "type": "string", "context": ["view", "edit"] },
|
|
"payment_method_title": {
|
|
"description": "Payment method title.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"transaction_id": { "description": "Unique transaction ID.", "type": "string", "context": ["view", "edit"] },
|
|
"date_paid": {
|
|
"description": "The date the order was paid, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_paid_gmt": {
|
|
"description": "The date the order was paid, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_completed": {
|
|
"description": "The date the order was completed, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_completed_gmt": {
|
|
"description": "The date the order was completed, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"cart_hash": {
|
|
"description": "MD5 hash of basket items to ensure orders are not modified.",
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
},
|
|
"line_items": {
|
|
"description": "Line items data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Product name.", "type": "mixed", "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": "mixed", "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": "mixed", "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"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tax_lines": {
|
|
"description": "Tax lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"rate_code": {
|
|
"description": "Tax rate code.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rate_id": {
|
|
"description": "Tax rate ID",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "Tax rate label.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"compound": {
|
|
"description": "Show if is a compound tax rate.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_total": {
|
|
"description": "Tax total (not including shipping taxes).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"shipping_tax_total": {
|
|
"description": "Shipping 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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_lines": {
|
|
"description": "Shipping lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"method_title": {
|
|
"description": "Shipping method name.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"method_id": { "description": "Shipping method ID.", "type": "mixed", "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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"fee_lines": {
|
|
"description": "Fee lines data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Fee name.", "type": "mixed", "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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"coupon_lines": {
|
|
"description": "Coupons line data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Item ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"code": { "description": "Coupon code.", "type": "mixed", "context": ["view", "edit"] },
|
|
"discount": { "description": "Discount total.", "type": "string", "context": ["view", "edit"] },
|
|
"discount_tax": {
|
|
"description": "Discount total tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"refunds": {
|
|
"description": "List of refunds.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Refund ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"reason": {
|
|
"description": "Refund reason.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total": {
|
|
"description": "Refund total.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"payment_url": {
|
|
"description": "Order payment URL.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"set_paid": {
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["edit"]
|
|
},
|
|
"is_editable": {
|
|
"description": "Whether an order can be edited.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"needs_payment": {
|
|
"description": "Whether an order needs payment, based on status and order total.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"needs_processing": {
|
|
"description": "Whether an order needs processing before it can be completed.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product_attribute_term": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_attribute_term",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Term name.", "type": "string", "context": ["view", "edit"] },
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the resource.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"menu_order": {
|
|
"description": "Menu order, used to custom sort the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"count": {
|
|
"description": "Number of published products for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product_attribute": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_attribute",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Attribute name.", "type": "string", "context": ["view", "edit"] },
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of attribute.",
|
|
"type": "string",
|
|
"default": "select",
|
|
"enum": ["select"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"order_by": {
|
|
"description": "Default sort order.",
|
|
"type": "string",
|
|
"default": "menu_order",
|
|
"enum": ["menu_order", "name", "name_num", "id"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"has_archives": {
|
|
"description": "Enable/Disable attribute archives.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"product_cat": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_cat",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of published posts for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL of the term.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"taxonomy": {
|
|
"description": "Type attribution for the term.",
|
|
"type": "string",
|
|
"enum": ["product_cat"],
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": { "description": "The parent term ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"product_review": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_review",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"review": { "description": "The content of the review.", "type": "string", "context": ["view", "edit"] },
|
|
"date_created": {
|
|
"description": "The date the review was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the review was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"rating": { "description": "Review rating (0 to 5).", "type": "integer", "context": ["view", "edit"] },
|
|
"name": { "description": "Reviewer name.", "type": "string", "context": ["view", "edit"] },
|
|
"email": { "description": "Reviewer email.", "type": "string", "context": ["view", "edit"] },
|
|
"verified": {
|
|
"description": "Shows if the reviewer bought the product or not.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product_shipping_class": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_shipping_class",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Shipping class name.", "type": "string", "context": ["view", "edit"] },
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the resource.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"count": {
|
|
"description": "Number of published products for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product_tag": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_tag",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of published posts for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL of the term.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"taxonomy": {
|
|
"description": "Type attribution for the term.",
|
|
"type": "string",
|
|
"enum": ["product_tag"],
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"product": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"password": {
|
|
"description": "A password to protect access to the content and excerpt.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"permalink_template": {
|
|
"description": "Permalink template for the post.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"generated_slug": {
|
|
"description": "Slug automatically generated from the post title.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"class_list": {
|
|
"description": "An array of the class names for the post container element.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"featured_media": {
|
|
"description": "The ID of the featured media for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"product_cat": {
|
|
"description": "The terms assigned to the object in the product_cat taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"product_tag": {
|
|
"description": "The terms assigned to the object in the product_tag taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-product_cat",
|
|
"title": "The current user can assign terms in the product_cat taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "product_cat": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-product_cat",
|
|
"title": "The current user can create terms in the product_cat taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "product_cat": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-product_tag",
|
|
"title": "The current user can assign terms in the product_tag taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "product_tag": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-product_tag",
|
|
"title": "The current user can create terms in the product_tag taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/product/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "product_tag": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"product_variation": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product_variation",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "The date the variation was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the variation was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": { "description": "Variation description.", "type": "string", "context": ["view", "edit"] },
|
|
"permalink": {
|
|
"description": "Variation URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sku": { "description": "Unique identifier.", "type": "string", "context": ["view", "edit"] },
|
|
"price": {
|
|
"description": "Current variation price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": { "description": "Variation regular price.", "type": "string", "context": ["view", "edit"] },
|
|
"sale_price": { "description": "Variation sale price.", "type": "string", "context": ["view", "edit"] },
|
|
"date_on_sale_from": {
|
|
"description": "Start date of sale price, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"description": "Start date of sale price, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_on_sale_to": {
|
|
"description": "End date of sale price, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"description": "End date of sale price, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"on_sale": {
|
|
"description": "Shows if the variation is on sale.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"visible": {
|
|
"description": "Define if the variation is visible on the product's page.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"purchasable": {
|
|
"description": "Shows if the variation can be bought.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"virtual": {
|
|
"description": "If the variation is virtual.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"downloadable": {
|
|
"description": "If the variation is downloadable.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"downloads": {
|
|
"description": "List of downloadable files.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"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": {
|
|
"description": "Number of times downloadable files can be downloaded after purchase.",
|
|
"type": "integer",
|
|
"default": -1,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"download_expiry": {
|
|
"description": "Number of days until access to downloadable files expires.",
|
|
"type": "integer",
|
|
"default": -1,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"tax_status": {
|
|
"description": "Tax status.",
|
|
"type": "string",
|
|
"default": "taxable",
|
|
"enum": ["taxable", "shipping", "none"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"tax_class": { "description": "Tax class.", "type": "string", "context": ["view", "edit"] },
|
|
"manage_stock": {
|
|
"description": "Stock management at variation level.",
|
|
"type": "mixed",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"stock_quantity": { "description": "Stock quantity.", "type": "integer", "context": ["view", "edit"] },
|
|
"in_stock": {
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"backorders": {
|
|
"description": "If managing stock, this controls if back-orders are allowed.",
|
|
"type": "string",
|
|
"default": "no",
|
|
"enum": ["no", "notify", "yes"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"backorders_allowed": {
|
|
"description": "Shows if back-orders are allowed.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"backordered": {
|
|
"description": "Shows if the variation is on back-order.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"weight": { "description": "Variation weight (kg).", "type": "string", "context": ["view", "edit"] },
|
|
"dimensions": {
|
|
"description": "Variation dimensions.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"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": { "description": "Shipping class slug.", "type": "string", "context": ["view", "edit"] },
|
|
"shipping_class_id": {
|
|
"description": "Shipping class ID.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"image": {
|
|
"description": "Variation image data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"id": { "description": "Image ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"date_created": {
|
|
"description": "The date the image was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the image was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the image was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified_gmt": {
|
|
"description": "The date the image was last modified, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"src": { "description": "Image URL.", "type": "string", "format": "uri", "context": ["view", "edit"] },
|
|
"name": { "description": "Image name.", "type": "string", "context": ["view", "edit"] },
|
|
"alt": { "description": "Image alternative text.", "type": "string", "context": ["view", "edit"] },
|
|
"position": {
|
|
"description": "Image position. 0 means that the image is featured.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"attributes": {
|
|
"description": "List of attributes.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"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": {
|
|
"description": "Menu order, used to custom sort products.",
|
|
"type": "integer",
|
|
"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": "mixed", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sales_report": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "sales_report",
|
|
"type": "object",
|
|
"properties": {
|
|
"total_sales": {
|
|
"description": "Gross sales in the period.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"net_sales": {
|
|
"description": "Net sales in the period.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"average_sales": {
|
|
"description": "Average net daily sales.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_orders": {
|
|
"description": "Total of orders placed.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_items": {
|
|
"description": "Total of items purchased.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_tax": {
|
|
"description": "Total charged for taxes.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_shipping": {
|
|
"description": "Total charged for shipping.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_refunds": {
|
|
"description": "Total of refunded orders.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total of coupons used.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"totals_grouped_by": {
|
|
"description": "Group type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"totals": {
|
|
"description": "Totals.",
|
|
"type": "array",
|
|
"items": { "type": "array" },
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"top_sellers_report": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "top_sellers_report",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "description": "Product name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"product_id": { "description": "Product ID.", "type": "integer", "context": ["view"], "readonly": true },
|
|
"quantity": {
|
|
"description": "Total number of purchases.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"report_order_total": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_order_total",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Order status name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"total": { "description": "Amount of orders.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"report_product_total": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_product_total",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Product type name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"total": { "description": "Amount of products.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"report_customer_total": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_customer_total",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Customer type name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"total": { "description": "Amount of customers.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"report_coupon_total": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_coupon_total",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Coupon type name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"total": { "description": "Amount of coupons.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"report_review_total": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_review_total",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Review type name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"total": { "description": "Amount of reviews.", "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"report": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human-readable description of the resource.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"setting_group": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "setting_group",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "A unique identifier that can be used to link settings together.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "A human readable label for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human readable description for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"parent_id": {
|
|
"description": "ID of parent grouping.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"sub_groups": {
|
|
"description": "IDs for settings sub groups.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"setting": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "setting",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "A unique identifier for the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "A human readable label for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human readable description for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": { "description": "Setting value.", "type": "mixed", "context": ["view", "edit"] },
|
|
"default": {
|
|
"description": "Default value for the setting.",
|
|
"type": "mixed",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tip": {
|
|
"description": "Additional help text shown to the user about the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"placeholder": {
|
|
"description": "Placeholder text to be displayed in text inputs.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "Type of setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"enum": [
|
|
"text",
|
|
"email",
|
|
"number",
|
|
"color",
|
|
"password",
|
|
"textarea",
|
|
"select",
|
|
"multiselect",
|
|
"radio",
|
|
"image_width",
|
|
"checkbox",
|
|
"thumbnail_cropping"
|
|
],
|
|
"readonly": true
|
|
},
|
|
"options": {
|
|
"description": "Array of options (key value pairs) for inputs such as select, multiselect, and radio buttons.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"shipping_zone": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shipping_zone",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Shipping zone name.", "type": "string", "context": ["view", "edit"] },
|
|
"order": { "description": "Shipping zone order.", "type": "integer", "context": ["view", "edit"] }
|
|
}
|
|
},
|
|
"shipping_zone_location": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shipping_zone_location",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "description": "Shipping zone location code.", "type": "string", "context": ["view", "edit"] },
|
|
"type": {
|
|
"description": "Shipping zone location type.",
|
|
"type": "string",
|
|
"default": "country",
|
|
"enum": ["postcode", "state", "country", "continent"],
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"shipping_zone_method": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shipping_zone_method",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Shipping method instance ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"instance_id": {
|
|
"description": "Shipping method instance ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "Shipping method customer facing title.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"order": { "description": "Shipping method sort order.", "type": "integer", "context": ["view", "edit"] },
|
|
"enabled": {
|
|
"description": "Shipping method enabled status.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"method_id": {
|
|
"description": "Shipping method ID.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"method_title": {
|
|
"description": "Shipping method title.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"method_description": {
|
|
"description": "Shipping method description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"settings": {
|
|
"description": "Shipping method settings.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"id": {
|
|
"description": "A unique identifier for the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "A human readable label for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human readable description for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "Type of setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"enum": [
|
|
"text",
|
|
"email",
|
|
"number",
|
|
"color",
|
|
"password",
|
|
"textarea",
|
|
"select",
|
|
"multiselect",
|
|
"radio",
|
|
"image_width",
|
|
"checkbox"
|
|
],
|
|
"readonly": true
|
|
},
|
|
"value": { "description": "Setting value.", "type": "string", "context": ["view", "edit"] },
|
|
"default": {
|
|
"description": "Default value for the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tip": {
|
|
"description": "Additional help text shown to the user about the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"placeholder": {
|
|
"description": "Placeholder text to be displayed in text inputs.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tax_class": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "tax_class",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Tax class name.", "type": "string", "context": ["view", "edit"], "required": true }
|
|
}
|
|
},
|
|
"tax": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "tax",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"country": { "description": "Country ISO 3166 code.", "type": "string", "context": ["view", "edit"] },
|
|
"state": { "description": "State code.", "type": "string", "context": ["view", "edit"] },
|
|
"postcode": { "description": "Postcode / ZIP.", "type": "string", "context": ["view", "edit"] },
|
|
"city": { "description": "City name.", "type": "string", "context": ["view", "edit"] },
|
|
"rate": { "description": "Tax rate.", "type": "string", "context": ["view", "edit"] },
|
|
"name": { "description": "Tax rate name.", "type": "string", "context": ["view", "edit"] },
|
|
"priority": { "description": "Tax priority.", "type": "integer", "default": 1, "context": ["view", "edit"] },
|
|
"compound": {
|
|
"description": "Whether or not this is a compound rate.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"shipping": {
|
|
"description": "Whether or not this tax rate also gets applied to shipping.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"order": {
|
|
"description": "Indicates the order that will appear in queries.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"class": {
|
|
"description": "Tax class.",
|
|
"type": "string",
|
|
"default": "standard",
|
|
"enum": ["standard", "reduced-rate", "zero-rate"],
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"webhook": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "webhook",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "A friendly name for the webhook.", "type": "string", "context": ["view", "edit"] },
|
|
"status": {
|
|
"description": "Webhook status.",
|
|
"type": "string",
|
|
"default": "active",
|
|
"enum": ["active", "paused", "disabled"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"topic": { "description": "Webhook topic.", "type": "string", "context": ["view", "edit"] },
|
|
"resource": {
|
|
"description": "Webhook resource.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"event": { "description": "Webhook event.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"hooks": {
|
|
"description": "WooCommerce action names associated with the webhook.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"delivery_url": {
|
|
"description": "The URL where the webhook payload is delivered.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"secret": {
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"date_created": {
|
|
"description": "The date the webhook was created, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the webhook was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified": {
|
|
"description": "The date the webhook was last modified, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_modified_gmt": {
|
|
"description": "The date the webhook was last modified, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"system_status": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "system_status",
|
|
"type": "object",
|
|
"properties": {
|
|
"environment": {
|
|
"description": "Environment.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"home_url": {
|
|
"description": "Home URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"site_url": {
|
|
"description": "Site URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"store_id": {
|
|
"description": "WooCommerce Store Identifier.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"version": {
|
|
"description": "WooCommerce version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"log_directory": {
|
|
"description": "Log directory.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"log_directory_writable": {
|
|
"description": "Is log directory writable?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wp_version": {
|
|
"description": "WordPress version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wp_multisite": {
|
|
"description": "Is WordPress multisite?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wp_memory_limit": {
|
|
"description": "WordPress memory limit.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wp_debug_mode": {
|
|
"description": "Is WordPress debug mode active?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wp_cron": {
|
|
"description": "Are WordPress cron jobs enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"language": {
|
|
"description": "WordPress language.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"server_info": { "description": "Server info.", "type": "string", "context": ["view"], "readonly": true },
|
|
"php_version": { "description": "PHP version.", "type": "string", "context": ["view"], "readonly": true },
|
|
"php_post_max_size": {
|
|
"description": "PHP post max size.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"php_max_execution_time": {
|
|
"description": "PHP max execution time.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"php_max_input_vars": {
|
|
"description": "PHP max input vars.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"curl_version": {
|
|
"description": "cURL version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"suhosin_installed": {
|
|
"description": "Is SUHOSIN installed?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"max_upload_size": {
|
|
"description": "Max upload size.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"mysql_version": {
|
|
"description": "MySQL version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"mysql_version_string": {
|
|
"description": "MySQL version string.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"default_timezone": {
|
|
"description": "Default timezone.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"fsockopen_or_curl_enabled": {
|
|
"description": "Is fsockopen/cURL enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"soapclient_enabled": {
|
|
"description": "Is SoapClient class enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"domdocument_enabled": {
|
|
"description": "Is DomDocument class enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"gzip_enabled": {
|
|
"description": "Is GZip enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"mbstring_enabled": {
|
|
"description": "Is mbstring enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"remote_post_successful": {
|
|
"description": "Remote POST successful?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"remote_post_response": {
|
|
"description": "Remote POST response.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"remote_get_successful": {
|
|
"description": "Remote GET successful?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"remote_get_response": {
|
|
"description": "Remote GET response.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"database": {
|
|
"description": "Database.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"wc_database_version": {
|
|
"description": "WC database version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"database_prefix": {
|
|
"description": "Database prefix.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"maxmind_geoip_database": {
|
|
"description": "MaxMind GeoIP database.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"database_tables": {
|
|
"description": "Database tables.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"active_plugins": {
|
|
"description": "Active plugins.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"inactive_plugins": {
|
|
"description": "Inactive plugins.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"dropins_mu_plugins": {
|
|
"description": "Dropins & MU plugins.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"theme": {
|
|
"description": "Theme.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"name": { "description": "Theme name.", "type": "string", "context": ["view"], "readonly": true },
|
|
"version": { "description": "Theme version.", "type": "string", "context": ["view"], "readonly": true },
|
|
"version_latest": {
|
|
"description": "Latest version of theme.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"author_url": {
|
|
"description": "Theme author URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"is_child_theme": {
|
|
"description": "Is this theme a child theme?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"has_woocommerce_support": {
|
|
"description": "Does the theme declare WooCommerce support?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"has_woocommerce_file": {
|
|
"description": "Does the theme have a woocommerce.php file?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"has_outdated_templates": {
|
|
"description": "Does this theme have outdated templates?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"overrides": {
|
|
"description": "Template overrides.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"parent_name": {
|
|
"description": "Parent theme name.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"parent_version": {
|
|
"description": "Parent theme version.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"parent_author_url": {
|
|
"description": "Parent theme author URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"settings": {
|
|
"description": "Settings.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"api_enabled": {
|
|
"description": "Legacy REST API enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"force_ssl": { "description": "SSL forced?", "type": "boolean", "context": ["view"], "readonly": true },
|
|
"currency": { "description": "Currency.", "type": "string", "context": ["view"], "readonly": true },
|
|
"currency_symbol": {
|
|
"description": "Currency symbol.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"currency_position": {
|
|
"description": "Currency position.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"thousand_separator": {
|
|
"description": "Thousand separator.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"decimal_separator": {
|
|
"description": "Decimal separator.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"number_of_decimals": {
|
|
"description": "Number of decimals.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"geolocation_enabled": {
|
|
"description": "Geolocation enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"taxonomies": {
|
|
"description": "Taxonomy terms for product/order statuses.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"product_visibility_terms": {
|
|
"description": "Terms in the product visibility taxonomy.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"wccom_connected": {
|
|
"description": "Is store connected to WooCommerce.com?",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"enforce_approved_download_dirs": {
|
|
"description": "Enforce approved download directories?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"HPOS_enabled": {
|
|
"description": "Is HPOS enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"order_datastore": {
|
|
"description": "Order datastore.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"HPOS_sync_enabled": {
|
|
"description": "Is HPOS sync enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"security": {
|
|
"description": "Security.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"secure_connection": {
|
|
"description": "Is the connection to your store secure?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"hide_errors": {
|
|
"description": "Hide errors from visitors?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"pages": {
|
|
"description": "WooCommerce pages.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"post_type_counts": {
|
|
"description": "Total post count.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"logging": {
|
|
"description": "Logging.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"logging_enabled": {
|
|
"description": "Is logging enabled?",
|
|
"type": "boolean",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"default_handler": {
|
|
"description": "The logging handler class.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"retention_period_days": {
|
|
"description": "The number of days log entries are retained.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"level_threshold": {
|
|
"description": "Minimum severity level.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"log_directory_size": {
|
|
"description": "The size of the log directory.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"system_status_tool": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "system_status_tool",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "A unique identifier for the tool.", "type": "string", "context": ["view", "edit"] },
|
|
"name": { "description": "Tool name.", "type": "string", "context": ["view", "edit"] },
|
|
"action": { "description": "What running the tool will do.", "type": "string", "context": ["view", "edit"] },
|
|
"description": { "description": "Tool description.", "type": "string", "context": ["view", "edit"] },
|
|
"success": { "description": "Did the tool run successfully?", "type": "boolean", "context": ["edit"] },
|
|
"message": { "description": "Tool return message.", "type": "string", "context": ["edit"] }
|
|
}
|
|
},
|
|
"shipping_method": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shipping_method",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Method ID.", "type": "string", "context": ["view"], "readonly": true },
|
|
"title": { "description": "Shipping method title.", "type": "string", "context": ["view"], "readonly": true },
|
|
"description": {
|
|
"description": "Shipping method description.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"payment_gateway": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "payment_gateway",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Payment gateway ID.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "Payment gateway title on checkout.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"description": {
|
|
"description": "Payment gateway description on checkout.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"order": { "description": "Payment gateway sort order.", "type": "integer", "context": ["view", "edit"] },
|
|
"enabled": {
|
|
"description": "Payment gateway enabled status.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"method_title": {
|
|
"description": "Payment gateway method title.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"method_description": {
|
|
"description": "Payment gateway method description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"settings": {
|
|
"description": "Payment gateway settings.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"id": {
|
|
"description": "A unique identifier for the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "A human readable label for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human readable description for the setting used in interfaces.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "Type of setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"enum": [
|
|
"text",
|
|
"email",
|
|
"number",
|
|
"color",
|
|
"password",
|
|
"textarea",
|
|
"select",
|
|
"multiselect",
|
|
"radio",
|
|
"image_width",
|
|
"checkbox"
|
|
],
|
|
"readonly": true
|
|
},
|
|
"value": { "description": "Setting value.", "type": "string", "context": ["view", "edit"] },
|
|
"default": {
|
|
"description": "Default value for the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tip": {
|
|
"description": "Additional help text shown to the user about the setting.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"placeholder": {
|
|
"description": "Placeholder text to be displayed in text inputs.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"data_index": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "data_index",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "description": "Data resource ID.", "type": "string", "context": ["view"], "readonly": true },
|
|
"description": {
|
|
"description": "Data resource description.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"data_continents": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "data_continents",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "2 character continent code.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "type": "string", "description": "Full name of continent.", "context": ["view"], "readonly": true },
|
|
"countries": {
|
|
"type": "array",
|
|
"description": "List of countries on this continent.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "ISO3166 alpha-2 country code.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"currency_code": {
|
|
"type": "string",
|
|
"description": "Default ISO4127 alpha-3 currency code for the country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"currency_pos": {
|
|
"type": "string",
|
|
"description": "Currency symbol position for this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"decimal_sep": {
|
|
"type": "string",
|
|
"description": "Decimal separator for displayed prices for this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"dimension_unit": {
|
|
"type": "string",
|
|
"description": "The unit lengths are defined in for this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Full name of country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"num_decimals": {
|
|
"type": "integer",
|
|
"description": "Number of decimal points shown in displayed prices for this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"states": {
|
|
"type": "array",
|
|
"description": "List of states in this country.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"code": { "type": "string", "description": "State code.", "context": ["view"], "readonly": true },
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Full name of state.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"thousand_sep": {
|
|
"type": "string",
|
|
"description": "Thousands separator for displayed prices in this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"weight_unit": {
|
|
"type": "string",
|
|
"description": "The unit weights are defined in for this country.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"data_countries": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "data_countries",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "ISO3166 alpha-2 country code.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": { "type": "string", "description": "Full name of country.", "context": ["view"], "readonly": true },
|
|
"states": {
|
|
"type": "array",
|
|
"description": "List of states in this country.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"code": { "type": "string", "description": "State code.", "context": ["view"], "readonly": true },
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Full name of state.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"data_currencies": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "data_currencies",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "ISO4217 currency code.", "context": ["view"], "readonly": true },
|
|
"name": { "type": "string", "description": "Full name of currency.", "context": ["view"], "readonly": true },
|
|
"symbol": { "type": "string", "description": "Currency symbol.", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"marketing_recommendation": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "marketing_recommendation",
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "context": ["view"], "readonly": true },
|
|
"description": { "type": "string", "context": ["view"], "readonly": true },
|
|
"url": { "type": "string", "context": ["view"], "readonly": true },
|
|
"direct_install": { "type": "string", "context": ["view"], "readonly": true },
|
|
"icon": { "type": "string", "context": ["view"], "readonly": true },
|
|
"product": { "type": "string", "context": ["view"], "readonly": true },
|
|
"plugin": { "type": "string", "context": ["view"], "readonly": true },
|
|
"categories": { "type": "array", "context": ["view"], "readonly": true, "items": { "type": "string" } },
|
|
"subcategories": {
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"slug": { "type": "string", "context": ["view"], "readonly": true },
|
|
"name": { "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
}
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"slug": { "type": "string", "context": ["view"], "readonly": true },
|
|
"name": { "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"marketing_channel": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "marketing_channel",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "Unique identifier string for the marketing channel extension, also known as the plugin slug.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Name of the marketing channel.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of the marketing channel.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"icon": {
|
|
"description": "Path to the channel icon.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"is_setup_completed": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the marketing channel is set up.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"settings_url": {
|
|
"description": "URL to the settings page, or the link to complete the setup/onboarding if the channel has not been set up yet.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"product_listings_status": {
|
|
"description": "Status of the marketing channel's product listings.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"errors_count": {
|
|
"description": "Number of channel issues/errors (e.g. account-related errors, product synchronization issues, etc.).",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"marketing_campaign": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "marketing_campaign",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The unique identifier for the marketing campaign.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"channel": {
|
|
"description": "The unique identifier for the marketing channel that this campaign belongs to.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "Title of the marketing campaign.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"manage_url": {
|
|
"description": "URL to the campaign management page.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"cost": {
|
|
"description": "Cost of the marketing campaign.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"type": "object",
|
|
"properties": {
|
|
"value": { "type": "string", "context": ["view"], "readonly": true },
|
|
"currency": { "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"sales": {
|
|
"description": "Sales of the marketing campaign.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"type": "object",
|
|
"properties": {
|
|
"value": { "type": "string", "context": ["view"], "readonly": true },
|
|
"currency": { "type": "string", "context": ["view"], "readonly": true }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"marketing_campaign_type": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "marketing_campaign_type",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The unique identifier for the marketing campaign type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Name of the marketing campaign type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of the marketing campaign type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"channel": {
|
|
"description": "The marketing channel that this campaign type belongs to.",
|
|
"type": "object",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"slug": {
|
|
"description": "The unique identifier of the marketing channel that this campaign type belongs to.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The name of the marketing channel that this campaign type belongs to.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"create_url": {
|
|
"description": "URL to the create campaign page for this campaign type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"icon_url": {
|
|
"description": "URL to an image/icon for the campaign type.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "options",
|
|
"type": "object",
|
|
"properties": {
|
|
"options": {
|
|
"type": "array",
|
|
"description": "Array of options with associated values.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"payment-gateway-suggestions": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "payment-gateway-suggestions",
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "Suggestion description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"id": { "description": "Suggestion ID.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"image": { "description": "Gateway image.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"is_visible": {
|
|
"description": "Suggestion visibility.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"plugins": {
|
|
"description": "Array of plugin slugs.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"recommendation_priority": {
|
|
"description": "Priority of recommendation.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"title": { "description": "Gateway title.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"transaction_processors": {
|
|
"description": "Array of transaction processors and their images.",
|
|
"type": "object",
|
|
"addtionalProperties": { "type": "string", "format": "uri" },
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"upload_theme": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "upload_theme",
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"description": "Theme installation status.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"message": {
|
|
"description": "Theme installation message.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"theme": { "description": "Uploaded theme.", "type": "object", "context": ["view", "edit"], "readonly": true }
|
|
}
|
|
},
|
|
"plugins": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "plugins",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "description": "Plugin slug.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Plugin name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"connectAction": {
|
|
"description": "Action that should be completed to connect Jetpack.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"onboarding_profile": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "onboarding_profile",
|
|
"type": "object",
|
|
"properties": {
|
|
"completed": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the profile was completed.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"skipped": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the profile was skipped.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"industry": { "type": "array", "description": "Industry.", "context": ["view"], "readonly": true },
|
|
"product_types": {
|
|
"type": "array",
|
|
"description": "Types of products sold.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"product_count": {
|
|
"type": "string",
|
|
"description": "Number of products to be added.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"enum": ["0", "1-10", "11-100", "101-1000", "1000+"]
|
|
},
|
|
"selling_venues": {
|
|
"type": "string",
|
|
"description": "Other places the store is selling products.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"enum": ["no", "other", "brick-mortar", "brick-mortar-other", "other-woocommerce"]
|
|
},
|
|
"number_employees": {
|
|
"type": "string",
|
|
"description": "Number of employees of the store.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"enum": ["1", "<10", "10-50", "50-250", "+250", "not specified"]
|
|
},
|
|
"revenue": {
|
|
"type": "string",
|
|
"description": "Current annual revenue of the store.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"enum": [
|
|
"none",
|
|
"up-to-2500",
|
|
"2500-10000",
|
|
"10000-50000",
|
|
"50000-250000",
|
|
"more-than-250000",
|
|
"rather-not-say"
|
|
]
|
|
},
|
|
"other_platform": {
|
|
"type": "string",
|
|
"description": "Name of other platform used to sell.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"enum": ["shopify", "bigcommerce", "magento", "wix", "amazon", "ebay", "etsy", "squarespace", "other"]
|
|
},
|
|
"other_platform_name": {
|
|
"type": "string",
|
|
"description": "Name of other platform used to sell (not listed).",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"business_extensions": {
|
|
"type": "array",
|
|
"description": "Extra business extensions to install.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"theme": { "type": "string", "description": "Selected store theme.", "context": ["view"], "readonly": true },
|
|
"setup_client": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store was setup for a client.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"wccom_connected": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the store was connected to WooCommerce.com during the extension flow.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"is_agree_marketing": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store agreed to receiving marketing contents from WooCommerce.com.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"store_email": {
|
|
"type": "string",
|
|
"description": "Store email address.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"is_store_country_set": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store country is set via onboarding profiler.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"is_plugins_page_skipped": {
|
|
"type": "boolean",
|
|
"description": "Whether or not plugins step in core profiler was skipped.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"onboarding_theme": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "onboarding_theme",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "description": "Theme slug.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Theme name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"status": { "description": "Theme status.", "type": "string", "context": ["view", "edit"], "readonly": true }
|
|
}
|
|
},
|
|
"Install Async Schema": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "Install Async Schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": "integer",
|
|
"status": { "type": "string", "enum": ["pending", "complete", "failed"] }
|
|
}
|
|
}
|
|
},
|
|
"Install and Activate Schema": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "Install and Activate Schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"install": {
|
|
"type": "object",
|
|
"properties": {
|
|
"installed": { "type": "array", "items": { "type": "string" } },
|
|
"results": { "type": "array", "items": { "type": "string" } },
|
|
"errors": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errors": {
|
|
"type": "object",
|
|
"patternProperties": { "^.*$": { "type": "string" } },
|
|
"items": { "type": "string" }
|
|
},
|
|
"error_data": {
|
|
"type": "object",
|
|
"patternProperties": { "^.*$": { "type": "string" } },
|
|
"items": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"activate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"activated": { "type": "array", "items": { "type": "string" } },
|
|
"active": { "type": "array", "items": { "type": "string" } },
|
|
"errors": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errors": {
|
|
"type": "object",
|
|
"patternProperties": { "^.*$": { "type": "string" } },
|
|
"items": { "type": "string" }
|
|
},
|
|
"error_data": {
|
|
"type": "object",
|
|
"patternProperties": { "^.*$": { "type": "string" } },
|
|
"items": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping-partner-suggestions": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "shipping-partner-suggestions",
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "object",
|
|
"required": ["name", "is_visible", "available_layouts"],
|
|
"anyOf": [{ "required": "layout_row" }, { "required": "layout_column" }],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Plugin name.",
|
|
"type": "string",
|
|
"required": true,
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Plugin slug used in https:/wordpress.org/plugins/{slug}.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"layout_row": {
|
|
"type": "object",
|
|
"properties": {
|
|
"image": { "type": "string", "description": "" },
|
|
"features": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"icon": { "type": "string" },
|
|
"title": { "type": "string" },
|
|
"description": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"layout_column": {
|
|
"type": "object",
|
|
"properties": {
|
|
"image": { "type": "string", "description": "" },
|
|
"features": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"icon": { "type": "string" },
|
|
"title": { "type": "string" },
|
|
"description": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "Description",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"learn_more_link": {
|
|
"description": "Learn more link .",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_visible": {
|
|
"description": "Suggestion visibility.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"available_layouts": {
|
|
"description": "Available layouts -- single, dual, or both",
|
|
"type": "array",
|
|
"items": { "type": "string", "enum": ["row", "column"] },
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"report_customers": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_customers",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Customer ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"user_id": { "description": "User ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"name": { "description": "Name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"username": { "description": "Username.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"country": {
|
|
"description": "Country/Region.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"city": { "description": "City.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"state": { "description": "Region.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"postcode": {
|
|
"description": "Postal code.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_registered": {
|
|
"description": "Date registered.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_registered_gmt": {
|
|
"description": "Date registered GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_last_active": {
|
|
"description": "Date last active.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_last_active_gmt": {
|
|
"description": "Date last active GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"description": "Order count.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_spend": {
|
|
"description": "Total spend.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"avg_order_value": {
|
|
"description": "Average order value",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"leaderboard": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "leaderboard",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string", "description": "Leaderboard ID.", "context": ["view"], "readonly": true },
|
|
"label": {
|
|
"type": "string",
|
|
"description": "Displayed title for the leaderboard.",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"headers": {
|
|
"type": "array",
|
|
"description": "Table headers.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "array",
|
|
"properties": {
|
|
"label": {
|
|
"description": "Table column header.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"rows": {
|
|
"type": "array",
|
|
"description": "Table rows.",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "array",
|
|
"properties": {
|
|
"display": {
|
|
"description": "Table cell display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Table cell value.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"format": {
|
|
"description": "Table cell format.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"enum": ["currency", "number"],
|
|
"readonly": true,
|
|
"required": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_import": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_import",
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"description": "Regeneration status.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"message": {
|
|
"description": "Regenerate data message.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"report_export": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_export",
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"description": "Export status.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"message": {
|
|
"description": "Export status message.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"export_id": { "description": "Export ID.", "type": "string", "context": ["view", "edit"], "readonly": true }
|
|
}
|
|
},
|
|
"report_export_status": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_export_status",
|
|
"type": "object",
|
|
"properties": {
|
|
"percent_complete": {
|
|
"description": "Percentage complete.",
|
|
"type": "int",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"download_url": {
|
|
"description": "Export download URL.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"report_products": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_products",
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product ID."
|
|
},
|
|
"items_sold": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Number of items sold."
|
|
},
|
|
"net_revenue": {
|
|
"type": "number",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Total Net sales of all items sold."
|
|
},
|
|
"orders_count": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Number of orders product appeared in."
|
|
},
|
|
"extended_info": {
|
|
"name": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "Product name." },
|
|
"price": {
|
|
"type": "number",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product price."
|
|
},
|
|
"image": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product image."
|
|
},
|
|
"permalink": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product link."
|
|
},
|
|
"category_ids": {
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product category IDs."
|
|
},
|
|
"stock_status": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory status."
|
|
},
|
|
"stock_quantity": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory quantity."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory threshold for low stock."
|
|
},
|
|
"variations": {
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product variations IDs."
|
|
},
|
|
"sku": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "Product SKU." }
|
|
}
|
|
}
|
|
},
|
|
"report_varitations": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_varitations",
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product ID."
|
|
},
|
|
"variation_id": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product ID."
|
|
},
|
|
"items_sold": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Number of items sold."
|
|
},
|
|
"net_revenue": {
|
|
"type": "number",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Total Net sales of all items sold."
|
|
},
|
|
"orders_count": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Number of orders product appeared in."
|
|
},
|
|
"extended_info": {
|
|
"name": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "Product name." },
|
|
"price": {
|
|
"type": "number",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product price."
|
|
},
|
|
"image": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product image."
|
|
},
|
|
"permalink": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product link."
|
|
},
|
|
"attributes": {
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product attributes."
|
|
},
|
|
"stock_status": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory status."
|
|
},
|
|
"stock_quantity": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory quantity."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product inventory threshold for low stock."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_products_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_products_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Products sold",
|
|
"description": "Number of product items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Products sold",
|
|
"description": "Number of product items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"segment_label": {
|
|
"description": "Human readable segment label, either product or variation name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Products sold",
|
|
"description": "Number of product items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Products sold",
|
|
"description": "Number of product items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"segment_label": {
|
|
"description": "Human readable segment label, either product or variation name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_variations_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_variations_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Variations Sold",
|
|
"description": "Number of variation items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Variations Sold",
|
|
"description": "Number of variation items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"segment_label": {
|
|
"description": "Human readable segment label, either product or variation name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Variations Sold",
|
|
"description": "Number of variation items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"items_sold": {
|
|
"title": "Variations Sold",
|
|
"description": "Number of variation items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"segment_label": {
|
|
"description": "Human readable segment label, either product or variation name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_revenue_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_revenue_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_sales": {
|
|
"description": "Total sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons": {
|
|
"description": "Amount discounted by coupons.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"coupons_count": {
|
|
"description": "Unique coupons count.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping": {
|
|
"title": "Shipping",
|
|
"description": "Total of shipping.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"taxes": {
|
|
"description": "Total of taxes.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"refunds": {
|
|
"title": "Returns",
|
|
"description": "Total of returns.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"num_items_sold": {
|
|
"description": "Items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"gross_sales": {
|
|
"description": "Gross sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_sales": {
|
|
"description": "Total sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons": {
|
|
"description": "Amount discounted by coupons.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"coupons_count": {
|
|
"description": "Unique coupons count.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping": {
|
|
"title": "Shipping",
|
|
"description": "Total of shipping.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"taxes": {
|
|
"description": "Total of taxes.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"refunds": {
|
|
"title": "Returns",
|
|
"description": "Total of returns.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"num_items_sold": {
|
|
"description": "Items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"gross_sales": {
|
|
"description": "Gross sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"products": {
|
|
"description": "Products sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_sales": {
|
|
"description": "Total sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons": {
|
|
"description": "Amount discounted by coupons.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"coupons_count": {
|
|
"description": "Unique coupons count.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping": {
|
|
"title": "Shipping",
|
|
"description": "Total of shipping.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"taxes": {
|
|
"description": "Total of taxes.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"refunds": {
|
|
"title": "Returns",
|
|
"description": "Total of returns.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"num_items_sold": {
|
|
"description": "Items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"gross_sales": {
|
|
"description": "Gross sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_sales": {
|
|
"description": "Total sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"net_revenue": {
|
|
"description": "Net sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons": {
|
|
"description": "Amount discounted by coupons.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"coupons_count": {
|
|
"description": "Unique coupons count.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping": {
|
|
"title": "Shipping",
|
|
"description": "Total of shipping.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"taxes": {
|
|
"description": "Total of taxes.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"refunds": {
|
|
"title": "Returns",
|
|
"description": "Total of returns.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"num_items_sold": {
|
|
"description": "Items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"gross_sales": {
|
|
"description": "Gross sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_orders": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_orders",
|
|
"type": "object",
|
|
"properties": {
|
|
"order_id": { "description": "Order ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"order_number": {
|
|
"description": "Order Number.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "Date the order was created, in the site's time zone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "Date the order was created, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": { "description": "Order status.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"customer_id": {
|
|
"description": "Customer ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"num_items_sold": {
|
|
"description": "Number of items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"net_total": {
|
|
"description": "Net total revenue.",
|
|
"type": "float",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_formatted": {
|
|
"description": "Net total revenue (formatted).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_type": {
|
|
"description": "Returning or new customer.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extended_info": {
|
|
"products": {
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "List of order product IDs, names, quantities."
|
|
},
|
|
"coupons": {
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "List of order coupons."
|
|
},
|
|
"customer": {
|
|
"type": "object",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Order customer information."
|
|
},
|
|
"attribution": {
|
|
"type": "object",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Order attribution information."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_orders_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_orders_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"download_count": {
|
|
"title": "Downloads",
|
|
"description": "Number of downloads.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"download_count": {
|
|
"title": "Downloads",
|
|
"description": "Number of downloads.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_categories": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_categories",
|
|
"type": "object",
|
|
"properties": {
|
|
"category_id": {
|
|
"description": "Category ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"items_sold": {
|
|
"description": "Amount of items sold.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"net_revenue": {
|
|
"description": "Total sales.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"products_count": {
|
|
"description": "Amount of products.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extended_info": {
|
|
"name": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "Category name." }
|
|
}
|
|
}
|
|
},
|
|
"report_taxes": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_taxes",
|
|
"type": "object",
|
|
"properties": {
|
|
"tax_rate_id": {
|
|
"description": "Tax rate ID",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Tax rate name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"tax_rate": { "description": "Tax rate.", "type": "number", "context": ["view", "edit"], "readonly": true },
|
|
"country": {
|
|
"description": "Country/Region.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"state": { "description": "State.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"priority": { "description": "Priority.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"total_tax": { "description": "Total tax.", "type": "number", "context": ["view", "edit"], "readonly": true },
|
|
"order_tax": { "description": "Order tax.", "type": "number", "context": ["view", "edit"], "readonly": true },
|
|
"shipping_tax": {
|
|
"description": "Shipping tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"report_taxes_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_taxes_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_tax": {
|
|
"description": "Total tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"order_tax": {
|
|
"description": "Order tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping_tax": {
|
|
"description": "Shipping tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_codes": {
|
|
"description": "Amount of tax codes.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_tax": {
|
|
"description": "Total tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"order_tax": {
|
|
"description": "Order tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping_tax": {
|
|
"description": "Shipping tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_codes": {
|
|
"description": "Amount of tax codes.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_tax": {
|
|
"description": "Total tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"order_tax": {
|
|
"description": "Order tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping_tax": {
|
|
"description": "Shipping tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_codes": {
|
|
"description": "Amount of tax codes.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"total_tax": {
|
|
"description": "Total tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"order_tax": {
|
|
"description": "Order tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"shipping_tax": {
|
|
"description": "Shipping tax.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_codes": {
|
|
"description": "Amount of tax codes.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_coupons": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_coupons",
|
|
"type": "object",
|
|
"properties": {
|
|
"coupon_id": {
|
|
"description": "Coupon ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"amount": {
|
|
"description": "Net discount amount.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"description": "Number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extended_info": {
|
|
"code": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "Coupon code." },
|
|
"date_created": {
|
|
"type": "date-time",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Coupon creation date."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": "date-time",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Coupon creation date in GMT."
|
|
},
|
|
"date_expires": {
|
|
"type": "date-time",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Coupon expiration date."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": "date-time",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Coupon expiration date in GMT."
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"enum": ["percent", "fixed_cart", "fixed_product"],
|
|
"description": "Coupon discount type."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_coupons_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_coupons_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Net discount amount.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons_count": {
|
|
"description": "Number of coupons.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"title": "Discounted orders",
|
|
"description": "Number of discounted orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Net discount amount.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons_count": {
|
|
"description": "Number of coupons.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"title": "Discounted orders",
|
|
"description": "Number of discounted orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"intervals": {
|
|
"description": "Reports data grouped by intervals.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"interval": {
|
|
"description": "Type of interval.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": ["day", "week", "month", "year"]
|
|
},
|
|
"date_start": {
|
|
"description": "The date the report start, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_start_gmt": {
|
|
"description": "The date the report start, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end": {
|
|
"description": "The date the report end, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_end_gmt": {
|
|
"description": "The date the report end, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Net discount amount.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons_count": {
|
|
"description": "Number of coupons.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"title": "Discounted orders",
|
|
"description": "Number of discounted orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
},
|
|
"segments": {
|
|
"description": "Reports data grouped by segment condition.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"segment_id": {
|
|
"description": "Segment identificator.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotals": {
|
|
"description": "Interval subtotals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Net discount amount.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true,
|
|
"format": "currency"
|
|
},
|
|
"coupons_count": {
|
|
"description": "Number of coupons.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"orders_count": {
|
|
"title": "Discounted orders",
|
|
"description": "Number of discounted orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"indicator": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_stock": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_stock",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent_id": {
|
|
"description": "Product parent ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Product name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"sku": {
|
|
"description": "Unique identifier.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"stock_status": {
|
|
"description": "Stock status.",
|
|
"type": "string",
|
|
"enum": ["instock", "outofstock", "onbackorder"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"stock_quantity": {
|
|
"description": "Stock quantity.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"manage_stock": {
|
|
"description": "Manage stock.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"report_customers_stats": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_customers_stats",
|
|
"type": "object",
|
|
"properties": {
|
|
"totals": {
|
|
"description": "Totals data.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"customers_count": {
|
|
"description": "Number of customers.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"avg_orders_count": {
|
|
"description": "Average number of orders.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"avg_total_spend": {
|
|
"description": "Average total spend per customer.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
},
|
|
"avg_avg_order_value": {
|
|
"description": "Average AOV per customer.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"format": "currency"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"report_downloads": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_downloads",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "integer", "readonly": true, "context": ["view", "edit"], "description": "ID." },
|
|
"product_id": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Product ID."
|
|
},
|
|
"date": {
|
|
"description": "The date of the download, in the site's time zone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date of the download, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"download_id": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Download ID."
|
|
},
|
|
"file_name": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "File name." },
|
|
"file_path": { "type": "string", "readonly": true, "context": ["view", "edit"], "description": "File URL." },
|
|
"order_id": { "type": "integer", "readonly": true, "context": ["view", "edit"], "description": "Order ID." },
|
|
"order_number": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "Order Number."
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "User ID for the downloader."
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "User name of the downloader."
|
|
},
|
|
"ip_address": {
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"description": "IP address for the downloader."
|
|
}
|
|
}
|
|
},
|
|
"report_performance_indicator": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "report_performance_indicator",
|
|
"type": "object",
|
|
"properties": {
|
|
"stat": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"enum": [
|
|
"revenue/total_sales",
|
|
"revenue/net_revenue",
|
|
"revenue/shipping",
|
|
"revenue/refunds",
|
|
"revenue/gross_sales",
|
|
"orders/orders_count",
|
|
"orders/avg_order_value",
|
|
"products/items_sold",
|
|
"variations/items_sold",
|
|
"coupons/amount",
|
|
"coupons/orders_count",
|
|
"taxes/total_tax",
|
|
"taxes/order_tax",
|
|
"taxes/shipping_tax",
|
|
"downloads/download_count"
|
|
]
|
|
},
|
|
"chart": {
|
|
"description": "The specific chart this stat referrers to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"label": {
|
|
"description": "Human readable label for the stat.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"note": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "note",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "ID of the note record.", "type": "integer", "context": ["view"], "readonly": true },
|
|
"name": {
|
|
"description": "Name of the note.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "The type of the note (eg error, warning, etc).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"locale": {
|
|
"description": "Locale used for the note title and content.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "Title of the note.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"content": {
|
|
"description": "Content of the note.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"content_data": {
|
|
"description": "Content data for the note. JSON string. Available for re-localisation.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "The status of the note (e.g. unactioned, actioned).",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"source": {
|
|
"description": "Source of the note.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "Date the note was created.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "Date the note was created (GMT).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_reminder": {
|
|
"description": "Date after which the user should be reminded of the note, if any.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_reminder_gmt": {
|
|
"description": "Date after which the user should be reminded of the note, if any (GMT).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_snoozable": {
|
|
"description": "Whether or not a user can request to be reminded about the note.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"actions": {
|
|
"description": "An array of actions, if any, for the note.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"layout": {
|
|
"description": "The layout of the note (eg banner, thumbnail, plain).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"image": {
|
|
"description": "The image of the note, if any.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_deleted": {
|
|
"description": "Registers whether the note is deleted or not",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_read": {
|
|
"description": "Registers whether the note is read or not",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"data_download_ips": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "data_download_ips",
|
|
"type": "object",
|
|
"properties": {
|
|
"user_ip_address": { "type": "string", "description": "IP address.", "context": ["view"], "readonly": true }
|
|
}
|
|
},
|
|
"Count Low in Stock Items": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "Count Low in Stock Items",
|
|
"type": "object",
|
|
"properties": { "type": "object", "properties": { "total": "integer" } }
|
|
},
|
|
"cart": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "cart",
|
|
"type": "object",
|
|
"properties": {
|
|
"coupons": {
|
|
"description": "List of applied basket coupons.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "The coupon's unique code.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"discount_type": {
|
|
"description": "The discount type for the coupon (eg percentage or fixed amount)",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"totals": {
|
|
"description": "Total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount_tax": {
|
|
"description": "Total tax removed due to discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_rates": {
|
|
"description": "List of available shipping rates for the basket.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package_id": {
|
|
"description": "The ID of the package the shipping rates belong to.",
|
|
"type": ["integer", "string"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Name of the package.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"destination": {
|
|
"description": "Shipping destination address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"address_1": {
|
|
"description": "First line of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"address_2": {
|
|
"description": "Second line of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"city": {
|
|
"description": "City of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"state": {
|
|
"description": "ISO code, or name, for the state, province, or district of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"postcode": {
|
|
"description": "Zip or Postcode of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"country": {
|
|
"description": "ISO code for the country of the address being shipped to.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"items": {
|
|
"description": "List of basket items the returned shipping rates apply to.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Name of the item.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity of the item in the current package.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_rates": {
|
|
"description": "List of shipping rates.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rate_id": {
|
|
"description": "ID of the shipping rate.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Name of the shipping rate, e.g. Express shipping.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of the shipping rate, e.g. Dispatched via Royal Mail.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"delivery_time": {
|
|
"description": "Delivery time estimate text, e.g. 3-5 business days.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Price of this shipping rate using the smallest unit of the currency.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"taxes": {
|
|
"description": "Taxes applied to this shipping rate using the smallest unit of the currency.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"method_id": {
|
|
"description": "ID of the shipping method that provided the rate.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"instance_id": {
|
|
"description": "Instance ID of the shipping method that provided the rate.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"meta_data": {
|
|
"description": "Meta data attached to the shipping rate.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"description": "Meta key.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Meta value.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"selected": {
|
|
"description": "True if this is the rate currently selected by the customer for the basket.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_address": {
|
|
"description": "Current set shipping address for the customer.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"company": {
|
|
"description": "Company",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"city": {
|
|
"description": "City",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"phone": {
|
|
"description": "Phone",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"billing_address": {
|
|
"description": "Current set billing address for the customer.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"company": {
|
|
"description": "Company",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"city": {
|
|
"description": "City",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"phone": {
|
|
"description": "Phone",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"email": {
|
|
"description": "Email",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"items": {
|
|
"description": "List of basket items.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"description": "Unique identifier for the item.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "The item type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"id": {
|
|
"description": "The item product or variation ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity of this item.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity_limits": {
|
|
"description": "How the quantity of this item should be controlled, for example, any limits in place.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"minimum": {
|
|
"description": "The minimum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"maximum": {
|
|
"description": "The maximum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"multiple_of": {
|
|
"description": "The amount that quantities increment by. Quantity must be an multiple of this value.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": 1
|
|
},
|
|
"editable": {
|
|
"description": "If the quantity is editable or fixed.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "Product name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"short_description": {
|
|
"description": "Product short description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Product full description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sku": {
|
|
"description": "Stock keeping unit, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"low_stock_remaining": {
|
|
"description": "Quantity left in stock if stock is low, or null if not applicable.",
|
|
"type": ["integer", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"backorders_allowed": {
|
|
"description": "True if backorders are allowed past stock availability.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"show_backorder_badge": {
|
|
"description": "True if the product is on backorder.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sold_individually": {
|
|
"description": "If true, only one item of this product is allowed for purchase in a single order.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"permalink": {
|
|
"description": "Product URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"images": {
|
|
"description": "List of images.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Image ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"src": {
|
|
"description": "Full size image URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"thumbnail": {
|
|
"description": "Thumbnail URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"srcset": {
|
|
"description": "Thumbnail srcset for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sizes": {
|
|
"description": "Thumbnail sizes for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Image name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"alt": {
|
|
"description": "Image alternative text.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"variation": {
|
|
"description": "Chosen attributes (for variations).",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Variation attribute name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Variation attribute value.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"item_data": {
|
|
"description": "Metadata related to the item",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Name of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Value of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"display": {
|
|
"description": "Optionally, how the metadata value should be displayed to the user.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"prices": {
|
|
"description": "Price data for the product in the current line item, including or excluding taxes based on the \"display prices during basket and checkout\" setting. Provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price_range": {
|
|
"description": "Price range, if applicable.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"min_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"max_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"raw_prices": {
|
|
"description": "Raw unrounded product prices used in calculations. Provided using a higher unit of precision than the currency.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"precision": {
|
|
"description": "Decimal precision of the returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"totals": {
|
|
"description": "Item total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal": {
|
|
"description": "Line subtotal (the price of the product before coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal_tax": {
|
|
"description": "Line subtotal tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total": {
|
|
"description": "Line total (the price of the product after coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total_tax": {
|
|
"description": "Line total tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"catalog_visibility": {
|
|
"description": "Whether the product is visible in the catalogue",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extensions": { "type": "object", "context": ["view", "edit"], "properties": [], "readonly": true }
|
|
}
|
|
}
|
|
},
|
|
"items_count": {
|
|
"description": "Number of items in the basket.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"items_weight": {
|
|
"description": "Total weight (in grams) of all products in the basket.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"cross_sells": {
|
|
"description": "List of cross-sells items related to basket items.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Product name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Product slug.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": {
|
|
"description": "ID of the parent product, if applicable.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "Product type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"variation": {
|
|
"description": "Product variation attributes, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"permalink": {
|
|
"description": "Product URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"short_description": {
|
|
"description": "Product short description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Product full description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"on_sale": {
|
|
"description": "Is the product on sale?",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sku": {
|
|
"description": "Unique identifier.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"prices": {
|
|
"description": "Price data provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price_range": {
|
|
"description": "Price range, if applicable.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"min_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"max_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"price_html": {
|
|
"description": "Price string formatted as HTML.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"average_rating": {
|
|
"description": "Reviews average rating.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"review_count": {
|
|
"description": "Amount of reviews that the product has.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"images": {
|
|
"description": "List of images.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Image ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"src": {
|
|
"description": "Full size image URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"thumbnail": {
|
|
"description": "Thumbnail URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"srcset": {
|
|
"description": "Thumbnail srcset for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sizes": {
|
|
"description": "Thumbnail sizes for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Image name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"alt": {
|
|
"description": "Image alternative text.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"categories": {
|
|
"description": "List of categories, if applicable.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Category ID",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Category name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Category slug",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "Category link",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"tags": {
|
|
"description": "List of tags, if applicable.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Tag ID",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Tag name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Tag slug",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "Tag link",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"attributes": {
|
|
"description": "List of attributes (taxonomy terms) assigned to the product. For variable products, these are mapped to variations (see the `variations` field).",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The attribute ID, or 0 if the attribute is not taxonomy based.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The attribute name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"taxonomy": {
|
|
"description": "The attribute taxonomy, or null if the attribute is not taxonomy based.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"has_variations": {
|
|
"description": "True if this attribute is used by product variations.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"terms": {
|
|
"description": "List of assigned attribute terms.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The term ID, or 0 if the attribute is not a global attribute.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The term name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "The term slug.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"default": {
|
|
"description": "If this is a default attribute",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"variations": {
|
|
"description": "List of variation IDs, if applicable.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The attribute ID, or 0 if the attribute is not taxonomy based.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"attributes": {
|
|
"description": "List of variation attributes.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The attribute name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "The assigned attribute.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"has_options": {
|
|
"description": "Does the product have additional options before it can be added to the basket?",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_purchasable": {
|
|
"description": "Is the product purchasable?",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_in_stock": {
|
|
"description": "Is the product in stock?",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_on_backorder": {
|
|
"description": "Is the product stock backordered? This will also return false if backorder notifications are turned off.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"low_stock_remaining": {
|
|
"description": "Quantity left in stock if stock is low, or null if not applicable.",
|
|
"type": ["integer", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sold_individually": {
|
|
"description": "If true, only one item of this product is allowed for purchase in a single order.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"add_to_cart": {
|
|
"description": "Add to basket button parameters.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"text": {
|
|
"description": "Button text.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Button description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"url": {
|
|
"description": "Add to basket URL.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"minimum": {
|
|
"description": "The minimum quantity that can be added to the basket.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"maximum": {
|
|
"description": "The maximum quantity that can be added to the basket.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"multiple_of": {
|
|
"description": "The amount that quantities increment by. Quantity must be an multiple of this value.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": 1
|
|
}
|
|
}
|
|
},
|
|
"extensions": { "type": "object", "context": ["view", "edit"], "properties": [], "readonly": true }
|
|
}
|
|
}
|
|
},
|
|
"needs_payment": {
|
|
"description": "True if the basket needs payment. False for baskets with only free products and no shipping costs.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"needs_shipping": {
|
|
"description": "True if the basket needs shipping. False for baskets with only digital goods or stores with no shipping methods set-up.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"has_calculated_shipping": {
|
|
"description": "True if the basket meets the criteria for showing shipping costs, and rates have been calculated and included in the totals.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"fees": {
|
|
"description": "List of basket fees.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the fee within the basket.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Fee name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"totals": {
|
|
"description": "Fee total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total": {
|
|
"description": "Total amount for this fee.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_tax": {
|
|
"description": "Total tax amount for this fee.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"totals": {
|
|
"description": "Basket total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_items": {
|
|
"description": "Total price of items in the basket.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_items_tax": {
|
|
"description": "Total tax on items in the basket.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_fees": {
|
|
"description": "Total price of any applied fees.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_fees_tax": {
|
|
"description": "Total tax on fees.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total discount from applied coupons.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount_tax": {
|
|
"description": "Total tax removed due to discount from applied coupons.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_shipping": {
|
|
"description": "Total price of shipping. If shipping has not been calculated, a null response will be sent.",
|
|
"type": ["string", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_shipping_tax": {
|
|
"description": "Total tax on shipping. If shipping has not been calculated, a null response will be sent.",
|
|
"type": ["string", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_price": {
|
|
"description": "Total price the customer will pay.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_tax": {
|
|
"description": "Total tax applied to items and shipping.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_lines": {
|
|
"description": "Lines of taxes applied to items and shipping.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "The amount of tax charged.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rate": {
|
|
"description": "The rate at which tax is applied.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"errors": {
|
|
"description": "List of basket item errors, for example, items in the basket which are out of stock.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"message": {
|
|
"description": "Error message",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"payment_methods": {
|
|
"description": "List of available payment method IDs that can be used to process the order.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"payment_requirements": {
|
|
"description": "List of required payment gateway features to process the order.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extensions": { "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"cart_coupon": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "cart_coupon",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "description": "The coupon's unique code.", "type": "string", "context": ["view", "edit"] },
|
|
"discount_type": {
|
|
"description": "The discount type for the coupon (eg percentage or fixed amount)",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"totals": {
|
|
"description": "Total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount_tax": {
|
|
"description": "Total tax removed due to discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cart-extensions": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "cart-extensions",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"cart_item": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "cart_item",
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"description": "Unique identifier for the item.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": { "description": "The item type.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"id": {
|
|
"description": "The item product or variation ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity of this item.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity_limits": {
|
|
"description": "How the quantity of this item should be controlled, for example, any limits in place.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"minimum": {
|
|
"description": "The minimum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"maximum": {
|
|
"description": "The maximum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"multiple_of": {
|
|
"description": "The amount that quantities increment by. Quantity must be an multiple of this value.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": 1
|
|
},
|
|
"editable": {
|
|
"description": "If the quantity is editable or fixed.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"name": { "description": "Product name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"short_description": {
|
|
"description": "Product short description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Product full description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sku": {
|
|
"description": "Stock keeping unit, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"low_stock_remaining": {
|
|
"description": "Quantity left in stock if stock is low, or null if not applicable.",
|
|
"type": ["integer", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"backorders_allowed": {
|
|
"description": "True if backorders are allowed past stock availability.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"show_backorder_badge": {
|
|
"description": "True if the product is on backorder.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sold_individually": {
|
|
"description": "If true, only one item of this product is allowed for purchase in a single order.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"permalink": {
|
|
"description": "Product URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"images": {
|
|
"description": "List of images.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "Image ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"src": {
|
|
"description": "Full size image URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"thumbnail": {
|
|
"description": "Thumbnail URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"srcset": {
|
|
"description": "Thumbnail srcset for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"sizes": {
|
|
"description": "Thumbnail sizes for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"name": { "description": "Image name.", "type": "string", "context": ["view", "edit"] },
|
|
"alt": { "description": "Image alternative text.", "type": "string", "context": ["view", "edit"] }
|
|
}
|
|
}
|
|
},
|
|
"variation": {
|
|
"description": "Chosen attributes (for variations).",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Variation attribute name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Variation attribute value.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"item_data": {
|
|
"description": "Metadata related to the item",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Name of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Value of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"display": {
|
|
"description": "Optionally, how the metadata value should be displayed to the user.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"prices": {
|
|
"description": "Price data for the product in the current line item, including or excluding taxes based on the \"display prices during basket and checkout\" setting. Provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price_range": {
|
|
"description": "Price range, if applicable.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"min_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"max_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"raw_prices": {
|
|
"description": "Raw unrounded product prices used in calculations. Provided using a higher unit of precision than the currency.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"precision": {
|
|
"description": "Decimal precision of the returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"totals": {
|
|
"description": "Item total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal": {
|
|
"description": "Line subtotal (the price of the product before coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal_tax": {
|
|
"description": "Line subtotal tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total": {
|
|
"description": "Line total (the price of the product after coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total_tax": {
|
|
"description": "Line total tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"catalog_visibility": {
|
|
"description": "Whether the product is visible in the catalogue",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extensions": { "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"checkout": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "checkout",
|
|
"type": "object",
|
|
"properties": {
|
|
"order_id": {
|
|
"description": "The order ID to process during checkout.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "Order status. Payment providers will update this value after payment.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"order_key": {
|
|
"description": "Order key used to check validity or protect access to certain order data.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"order_number": {
|
|
"description": "Order number used for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_note": {
|
|
"description": "Note added to the order by the customer during checkout.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"customer_id": {
|
|
"description": "Customer ID if registered. Will return 0 for guests.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"billing_address": {
|
|
"description": "Billing address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"company": { "description": "Company", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"city": { "description": "City", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"phone": { "description": "Phone", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"email": { "description": "Email", "type": "string", "context": ["view", "edit"], "required": true }
|
|
},
|
|
"required": true
|
|
},
|
|
"shipping_address": {
|
|
"description": "Shipping address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"company": { "description": "Company", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"city": { "description": "City", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"phone": { "description": "Phone", "type": "string", "context": ["view", "edit"], "required": true }
|
|
}
|
|
},
|
|
"payment_method": {
|
|
"description": "The ID of the payment method being used to process the payment.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"enum": ["bacs", "cheque", "cod"]
|
|
},
|
|
"create_account": {
|
|
"description": "Whether to create a new user account as part of order processing.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"payment_result": {
|
|
"description": "Result of payment processing, or false if not yet processed.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"payment_status": {
|
|
"description": "Status of the payment returned by the gateway. One of success, pending, failure, error.",
|
|
"readonly": true,
|
|
"type": "string"
|
|
},
|
|
"payment_details": {
|
|
"description": "An array of data being returned from the payment gateway.",
|
|
"readonly": true,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": { "key": { "type": "string" }, "value": { "type": "string" } }
|
|
}
|
|
},
|
|
"redirect_url": {
|
|
"description": "A URL to redirect the customer after checkout. This could be, for example, a link to the payment processors website.",
|
|
"readonly": true,
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"description": "Additional fields to be persisted on the order.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": [],
|
|
"required": false
|
|
},
|
|
"extensions": {
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"woocommerce/order-attribution": {
|
|
"description": "Extension data registered by woocommerce/order-attribution",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"source_type": {
|
|
"description": "Order attribution field: source_type",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"referrer": {
|
|
"description": "Order attribution field: referrer",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_campaign": {
|
|
"description": "Order attribution field: utm_campaign",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_source": {
|
|
"description": "Order attribution field: utm_source",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_medium": {
|
|
"description": "Order attribution field: utm_medium",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_content": {
|
|
"description": "Order attribution field: utm_content",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_id": {
|
|
"description": "Order attribution field: utm_id",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_term": {
|
|
"description": "Order attribution field: utm_term",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_source_platform": {
|
|
"description": "Order attribution field: utm_source_platform",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_creative_format": {
|
|
"description": "Order attribution field: utm_creative_format",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_marketing_tactic": {
|
|
"description": "Order attribution field: utm_marketing_tactic",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_entry": {
|
|
"description": "Order attribution field: session_entry",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_start_time": {
|
|
"description": "Order attribution field: session_start_time",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_pages": {
|
|
"description": "Order attribution field: session_pages",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_count": {
|
|
"description": "Order attribution field: session_count",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"user_agent": {
|
|
"description": "Order attribution field: user_agent",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"checkout-order": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "checkout-order",
|
|
"type": "object",
|
|
"properties": {
|
|
"order_id": {
|
|
"description": "The order ID to process during checkout.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "Order status. Payment providers will update this value after payment.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"order_key": {
|
|
"description": "Order key used to check validity or protect access to certain order data.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"order_number": {
|
|
"description": "Order number used for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"customer_note": {
|
|
"description": "Note added to the order by the customer during checkout.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"customer_id": {
|
|
"description": "Customer ID if registered. Will return 0 for guests.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"billing_address": {
|
|
"description": "Billing address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"company": { "description": "Company", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"city": { "description": "City", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"phone": { "description": "Phone", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"email": { "description": "Email", "type": "string", "context": ["view", "edit"], "required": true }
|
|
},
|
|
"required": true
|
|
},
|
|
"shipping_address": {
|
|
"description": "Shipping address.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"company": { "description": "Company", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"city": { "description": "City", "type": "string", "context": ["view", "edit"], "required": true },
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true
|
|
},
|
|
"phone": { "description": "Phone", "type": "string", "context": ["view", "edit"], "required": true }
|
|
}
|
|
},
|
|
"payment_method": {
|
|
"description": "The ID of the payment method being used to process the payment.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"enum": ["bacs", "cheque", "cod"]
|
|
},
|
|
"payment_result": {
|
|
"description": "Result of payment processing, or false if not yet processed.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"payment_status": {
|
|
"description": "Status of the payment returned by the gateway. One of success, pending, failure, error.",
|
|
"readonly": true,
|
|
"type": "string"
|
|
},
|
|
"payment_details": {
|
|
"description": "An array of data being returned from the payment gateway.",
|
|
"readonly": true,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": { "key": { "type": "string" }, "value": { "type": "string" } }
|
|
}
|
|
},
|
|
"redirect_url": {
|
|
"description": "A URL to redirect the customer after checkout. This could be, for example, a link to the payment processors website.",
|
|
"readonly": true,
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"description": "Additional fields to be persisted on the order.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": [],
|
|
"required": false
|
|
},
|
|
"extensions": {
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"woocommerce/order-attribution": {
|
|
"description": "Extension data registered by woocommerce/order-attribution",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"source_type": {
|
|
"description": "Order attribution field: source_type",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"referrer": {
|
|
"description": "Order attribution field: referrer",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_campaign": {
|
|
"description": "Order attribution field: utm_campaign",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_source": {
|
|
"description": "Order attribution field: utm_source",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_medium": {
|
|
"description": "Order attribution field: utm_medium",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_content": {
|
|
"description": "Order attribution field: utm_content",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_id": {
|
|
"description": "Order attribution field: utm_id",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_term": {
|
|
"description": "Order attribution field: utm_term",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_source_platform": {
|
|
"description": "Order attribution field: utm_source_platform",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_creative_format": {
|
|
"description": "Order attribution field: utm_creative_format",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"utm_marketing_tactic": {
|
|
"description": "Order attribution field: utm_marketing_tactic",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_entry": {
|
|
"description": "Order attribution field: session_entry",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_start_time": {
|
|
"description": "Order attribution field: session_start_time",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_pages": {
|
|
"description": "Order attribution field: session_pages",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"session_count": {
|
|
"description": "Order attribution field: session_count",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
},
|
|
"user_agent": {
|
|
"description": "Order attribution field: user_agent",
|
|
"type": ["string", "null"],
|
|
"context": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"order": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "order",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "description": "The order ID.", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"items": {
|
|
"description": "Line items data.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"description": "Unique identifier for the item.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "The item type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"id": {
|
|
"description": "The item product or variation ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity of this item.",
|
|
"type": "number",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"quantity_limits": {
|
|
"description": "How the quantity of this item should be controlled, for example, any limits in place.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"minimum": {
|
|
"description": "The minimum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"maximum": {
|
|
"description": "The maximum quantity allowed for this line item.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"multiple_of": {
|
|
"description": "The amount that quantities increment by. Quantity must be an multiple of this value.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": 1
|
|
},
|
|
"editable": {
|
|
"description": "If the quantity is editable or fixed.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"default": true
|
|
}
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "Product name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"short_description": {
|
|
"description": "Product short description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Product full description in HTML format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sku": {
|
|
"description": "Stock keeping unit, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"low_stock_remaining": {
|
|
"description": "Quantity left in stock if stock is low, or null if not applicable.",
|
|
"type": ["integer", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"backorders_allowed": {
|
|
"description": "True if backorders are allowed past stock availability.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"show_backorder_badge": {
|
|
"description": "True if the product is on backorder.",
|
|
"type": ["boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sold_individually": {
|
|
"description": "If true, only one item of this product is allowed for purchase in a single order.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"permalink": {
|
|
"description": "Product URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"images": {
|
|
"description": "List of images.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Image ID.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"src": {
|
|
"description": "Full size image URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"thumbnail": {
|
|
"description": "Thumbnail URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"srcset": {
|
|
"description": "Thumbnail srcset for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sizes": {
|
|
"description": "Thumbnail sizes for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Image name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"alt": {
|
|
"description": "Image alternative text.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"variation": {
|
|
"description": "Chosen attributes (for variations).",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Variation attribute name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Variation attribute value.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"item_data": {
|
|
"description": "Metadata related to the item",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Name of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"value": {
|
|
"description": "Value of the metadata.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"display": {
|
|
"description": "Optionally, how the metadata value should be displayed to the user.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"prices": {
|
|
"description": "Price data for the product in the current line item, including or excluding taxes based on the \"display prices during basket and checkout\" setting. Provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price_range": {
|
|
"description": "Price range, if applicable.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"min_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"max_amount": {
|
|
"description": "Price amount.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"raw_prices": {
|
|
"description": "Raw unrounded product prices used in calculations. Provided using a higher unit of precision than the currency.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"precision": {
|
|
"description": "Decimal precision of the returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "Current product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"regular_price": {
|
|
"description": "Regular product price.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"sale_price": {
|
|
"description": "Sale product price, if applicable.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"totals": {
|
|
"description": "Item total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal": {
|
|
"description": "Line subtotal (the price of the product before coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_subtotal_tax": {
|
|
"description": "Line subtotal tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total": {
|
|
"description": "Line total (the price of the product after coupon discounts have been applied).",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"line_total_tax": {
|
|
"description": "Line total tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"catalog_visibility": {
|
|
"description": "Whether the product is visible in the catalogue",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"extensions": { "type": "object", "context": ["view", "edit"], "properties": [], "readonly": true }
|
|
}
|
|
}
|
|
},
|
|
"totals": {
|
|
"description": "Order totals.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"subtotal": {
|
|
"description": "Subtotal of the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total discount from applied coupons.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_shipping": {
|
|
"description": "Total price of shipping.",
|
|
"type": ["string", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_fees": {
|
|
"description": "Total price of any applied fees.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_tax": {
|
|
"description": "Total tax applied to the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_refund": {
|
|
"description": "Total refund applied to the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_price": {
|
|
"description": "Total price the customer will pay.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_items": {
|
|
"description": "Total price of items in the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_items_tax": {
|
|
"description": "Total tax on items in the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_fees_tax": {
|
|
"description": "Total tax on fees.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount_tax": {
|
|
"description": "Total tax removed due to discount from applied coupons.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_shipping_tax": {
|
|
"description": "Total tax on shipping. If shipping has not been calculated, a null response will be sent.",
|
|
"type": ["string", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"tax_lines": {
|
|
"description": "Lines of taxes applied to items and shipping.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the tax.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"price": {
|
|
"description": "The amount of tax charged.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rate": {
|
|
"description": "The rate at which tax is applied.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"coupons": {
|
|
"description": "List of applied basket coupons.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "The coupon's unique code.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"discount_type": {
|
|
"description": "The discount type for the coupon (eg percentage or fixed amount)",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"totals": {
|
|
"description": "Total amounts provided using the smallest unit of the currency.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount": {
|
|
"description": "Total discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"total_discount_tax": {
|
|
"description": "Total tax removed due to discount applied by this coupon.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"shipping_address": {
|
|
"description": "Current set shipping address for the customer.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"company": {
|
|
"description": "Company",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"city": {
|
|
"description": "City",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"phone": {
|
|
"description": "Phone",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"billing_address": {
|
|
"description": "Current set billing address for the customer.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"first_name": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"last_name": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"company": {
|
|
"description": "Company",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_1": {
|
|
"description": "Address",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"address_2": {
|
|
"description": "Flat, suite, etc.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"city": {
|
|
"description": "City",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"state": {
|
|
"description": "State/County code, or name of the state, county, province, or district.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"postcode": {
|
|
"description": "Postcode",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"country": {
|
|
"description": "Country/Region code in ISO 3166-1 alpha-2 format.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"phone": {
|
|
"description": "Phone",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
},
|
|
"email": {
|
|
"description": "Email",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"required": true,
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"needs_payment": {
|
|
"description": "True if the basket needs payment. False for baskets with only free products and no shipping costs.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"needs_shipping": {
|
|
"description": "True if the basket needs shipping. False for baskets with only digital goods or stores with no shipping methods set-up.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"errors": {
|
|
"description": "List of basket item errors, for example, items in the basket which are out of stock.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Error code",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"message": {
|
|
"description": "Error message",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"payment_requirements": {
|
|
"description": "List of required payment gateway features to process the order.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "Status of the order.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"term": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "term",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Term name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"slug": {
|
|
"description": "String based identifier for the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Term description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": {
|
|
"description": "Parent term ID, if applicable.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of objects (posts of any type) assigned to the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product-category": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product-category",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": { "description": "Term name.", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"slug": {
|
|
"description": "String based identifier for the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Term description.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": {
|
|
"description": "Parent term ID, if applicable.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of objects (posts of any type) assigned to the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"image": {
|
|
"description": "Category image.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"id": { "description": "Image ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"src": {
|
|
"description": "Full size image URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"thumbnail": {
|
|
"description": "Thumbnail URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"srcset": {
|
|
"description": "Thumbnail srcset for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"sizes": {
|
|
"description": "Thumbnail sizes for responsive images.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"name": { "description": "Image name.", "type": "string", "context": ["view", "edit"] },
|
|
"alt": { "description": "Image alternative text.", "type": "string", "context": ["view", "edit"] }
|
|
}
|
|
},
|
|
"review_count": {
|
|
"description": "Number of reviews for products in this category.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"permalink": {
|
|
"description": "Category URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"product-collection-data": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product-collection-data",
|
|
"type": "object",
|
|
"properties": {
|
|
"price_range": {
|
|
"description": "Min and max prices found in collection of products, provided using the smallest unit of the currency.",
|
|
"type": ["object", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"currency_code": {
|
|
"description": "Currency code (in ISO format) for returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_symbol": {
|
|
"description": "Currency symbol for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_minor_unit": {
|
|
"description": "Currency minor unit (number of digits after the decimal separator) for returned prices.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_decimal_separator": {
|
|
"description": "Decimal separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_thousand_separator": {
|
|
"description": "Thousand separator for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_prefix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"currency_suffix": {
|
|
"description": "Price prefix for the currency which can be used to format returned prices.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"min_price": {
|
|
"description": "Minimum price found in collection of products.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"max_price": {
|
|
"description": "Maximum price found in collection of products.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"attribute_counts": {
|
|
"description": "Returns number of products within attribute terms.",
|
|
"type": ["array", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"term": { "description": "Term ID", "type": "integer", "context": ["view", "edit"], "readonly": true },
|
|
"count": {
|
|
"description": "Number of products.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"rating_counts": {
|
|
"description": "Returns number of products with each average rating.",
|
|
"type": ["array", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rating": {
|
|
"description": "Average rating",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of products.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"stock_status_counts": {
|
|
"description": "Returns number of products with each stock status.",
|
|
"type": ["array", "null"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": { "description": "Status", "type": "string", "context": ["view", "edit"], "readonly": true },
|
|
"count": {
|
|
"description": "Number of products.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ai/store-title": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/store-title",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/images": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/images",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/patterns": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/patterns",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/product": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/product",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/products": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/products",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/business-description": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/business-description",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"ai/store-info": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "ai/store-info",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"patterns": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "patterns",
|
|
"type": "object",
|
|
"properties": []
|
|
},
|
|
"webhook_delivery": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "webhook_delivery",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the resource.",
|
|
"type": "integer",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"duration": {
|
|
"description": "The delivery duration, in seconds.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"summary": {
|
|
"description": "A friendly summary of the response including the HTTP response code, message, and body.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"request_url": {
|
|
"description": "The URL where the webhook was delivered.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"request_headers": {
|
|
"description": "Request headers",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"request_body": { "description": "Request body", "type": "string", "context": ["view"], "readonly": true },
|
|
"response_code": {
|
|
"description": "The HTTP response code from the receiving server.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"response_message": {
|
|
"description": "The HTTP response message from the receiving server.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"response_headers": {
|
|
"description": "Array of the response headers from the receiving server.",
|
|
"type": "array",
|
|
"context": ["view"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"response_body": {
|
|
"description": "The response body from the receiving server.",
|
|
"type": "string",
|
|
"context": ["view"],
|
|
"readonly": true
|
|
},
|
|
"date_created": {
|
|
"description": "The date the webhook delivery was logged, in the site's timezone.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_created_gmt": {
|
|
"description": "The date the webhook delivery was logged, as GMT.",
|
|
"type": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "post",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"password": {
|
|
"description": "A password to protect access to the content and excerpt.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"permalink_template": {
|
|
"description": "Permalink template for the post.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"generated_slug": {
|
|
"description": "Slug automatically generated from the post title.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"class_list": {
|
|
"description": "An array of the class names for the post container element.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"author": {
|
|
"description": "The ID for the author of the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"featured_media": {
|
|
"description": "The ID of the featured media for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"comment_status": {
|
|
"description": "Whether or not comments are open on the post.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"ping_status": {
|
|
"description": "Whether or not the post can be pinged.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"format": {
|
|
"description": "The format for the post.",
|
|
"type": "string",
|
|
"enum": ["standard", "aside", "chat", "gallery", "link", "image", "quote", "status", "video", "audio"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": { "footnotes": { "type": "string", "description": "", "default": "" } }
|
|
},
|
|
"sticky": {
|
|
"description": "Whether or not the post should be treated as sticky.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"categories": {
|
|
"description": "The terms assigned to the object in the category taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"tags": {
|
|
"description": "The terms assigned to the object in the post_tag taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-sticky",
|
|
"title": "The current user can sticky this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "sticky": { "type": "boolean" } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-author",
|
|
"title": "The current user can change the author on this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "author": { "type": "integer" } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-categories",
|
|
"title": "The current user can assign terms in the category taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "categories": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-categories",
|
|
"title": "The current user can create terms in the category taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "categories": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-tags",
|
|
"title": "The current user can assign terms in the post_tag taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "tags": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-tags",
|
|
"title": "The current user can create terms in the post_tag taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/posts/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "tags": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "post-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": { "footnotes": { "type": "string", "description": "", "default": "" } }
|
|
},
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"page": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "page",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"password": {
|
|
"description": "A password to protect access to the content and excerpt.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"permalink_template": {
|
|
"description": "Permalink template for the post.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"generated_slug": {
|
|
"description": "Slug automatically generated from the post title.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"class_list": {
|
|
"description": "An array of the class names for the post container element.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the object.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"author": {
|
|
"description": "The ID for the author of the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"featured_media": {
|
|
"description": "The ID of the featured media for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"comment_status": {
|
|
"description": "Whether or not comments are open on the post.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"ping_status": {
|
|
"description": "Whether or not the post can be pinged.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"menu_order": {
|
|
"description": "The order of the post in relation to other posts.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": { "footnotes": { "type": "string", "description": "", "default": "" } }
|
|
},
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/pages/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/pages/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-author",
|
|
"title": "The current user can change the author on this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/pages/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "author": { "type": "integer" } } }
|
|
}
|
|
]
|
|
},
|
|
"page-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "page-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": { "footnotes": { "type": "string", "description": "", "default": "" } }
|
|
},
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"attachment": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "attachment",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"permalink_template": {
|
|
"description": "Permalink template for the post.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"generated_slug": {
|
|
"description": "Slug automatically generated from the post title.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"class_list": {
|
|
"description": "An array of the class names for the post container element.",
|
|
"type": "array",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"items": { "type": "string" }
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"author": {
|
|
"description": "The ID for the author of the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"featured_media": {
|
|
"description": "The ID of the featured media for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"comment_status": {
|
|
"description": "Whether or not comments are open on the post.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"ping_status": {
|
|
"description": "Whether or not the post can be pinged.",
|
|
"type": "string",
|
|
"enum": ["open", "closed"],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"alt_text": {
|
|
"description": "Alternative text to display when attachment is not displayed.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"caption": {
|
|
"description": "The attachment caption.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Caption for the attachment, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML caption for the attachment, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "The attachment description.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Description for the attachment, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML description for the attachment, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"media_type": {
|
|
"description": "Attachment type.",
|
|
"type": "string",
|
|
"enum": ["image", "file"],
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"mime_type": {
|
|
"description": "The attachment MIME type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"media_details": {
|
|
"description": "Details about the media file, specific to its type.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"post": {
|
|
"description": "The ID for the associated post of the attachment.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"source_url": {
|
|
"description": "URL to the original attachment file.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"missing_image_sizes": {
|
|
"description": "List of the missing image sizes of the attachment.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/media/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-author",
|
|
"title": "The current user can change the author on this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/media/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "author": { "type": "integer" } } }
|
|
}
|
|
]
|
|
},
|
|
"nav_menu_item": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "nav_menu_item",
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"description": "The title for the object.",
|
|
"type": ["string", "object"],
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the object.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"minimum": 0,
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"type_label": {
|
|
"description": "The singular label used to describe this type of menu item.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\".",
|
|
"type": "string",
|
|
"enum": ["taxonomy", "post_type", "post_type_archive", "custom"],
|
|
"context": ["view", "edit", "embed"],
|
|
"default": "custom"
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"default": "publish",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the object.",
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"default": 0,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"attr_title": {
|
|
"description": "Text for the title attribute of the link element for this menu item.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"classes": {
|
|
"description": "Class names for the link element of this menu item.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"description": {
|
|
"description": "The description of this menu item.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"menu_order": {
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0.",
|
|
"context": ["view", "edit", "embed"],
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"default": 1
|
|
},
|
|
"object": {
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\".",
|
|
"context": ["view", "edit", "embed"],
|
|
"type": "string"
|
|
},
|
|
"object_id": {
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories.",
|
|
"context": ["view", "edit", "embed"],
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"default": 0
|
|
},
|
|
"target": {
|
|
"description": "The target attribute of the link element for this menu item.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"enum": ["_blank", ""]
|
|
},
|
|
"url": {
|
|
"description": "The URL to which this menu item points.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"xfn": {
|
|
"description": "The XFN relationship expressed in the link of this menu item.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"invalid": {
|
|
"description": "Whether the menu item represents an object that no longer exists .",
|
|
"context": ["view", "edit", "embed"],
|
|
"type": "boolean",
|
|
"readonly": true
|
|
},
|
|
"menus": {
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/menu-items/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/menu-items/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-menus",
|
|
"title": "The current user can assign terms in the nav_menu taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/menu-items/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "menus": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-menus",
|
|
"title": "The current user can create terms in the nav_menu taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/menu-items/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "menus": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/menu-item-object",
|
|
"title": "Get linked object.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/menu-items/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "object": { "type": "integer" } } }
|
|
}
|
|
]
|
|
},
|
|
"nav_menu_item-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "nav_menu_item-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "GUID for the revision, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the object.",
|
|
"type": ["string", "object"],
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"wp_block": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_block",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"password": {
|
|
"description": "A password to protect access to the content and excerpt.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"wp_pattern_sync_status": {
|
|
"type": "string",
|
|
"description": "",
|
|
"default": "",
|
|
"enum": ["partial", "unsynced"]
|
|
},
|
|
"footnotes": { "type": "string", "description": "", "default": "" }
|
|
}
|
|
},
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"wp_pattern_category": {
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"context": ["view", "edit"]
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/blocks/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/blocks/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-assign-wp_pattern_category",
|
|
"title": "The current user can assign terms in the wp_pattern_category taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/blocks/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "wp_pattern_category": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-create-wp_pattern_category",
|
|
"title": "The current user can create terms in the wp_pattern_category taxonomy.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/blocks/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "wp_pattern_category": { "type": "array", "items": { "type": "integer" } } }
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"wp_block-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_block-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"wp_pattern_sync_status": {
|
|
"type": "string",
|
|
"description": "",
|
|
"default": "",
|
|
"enum": ["partial", "unsynced"]
|
|
},
|
|
"footnotes": { "type": "string", "description": "", "default": "" }
|
|
}
|
|
},
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"wp_template": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_template",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "ID of template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Unique slug identifying the template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"required": true,
|
|
"minLength": 1,
|
|
"pattern": "[a-zA-Z0-9_\\%-]+"
|
|
},
|
|
"theme": {
|
|
"description": "Theme identifier for the template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"type": { "description": "Type of template.", "type": "string", "context": ["embed", "view", "edit"] },
|
|
"source": {
|
|
"description": "Source of template",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"origin": {
|
|
"description": "Source of a customised template",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"content": {
|
|
"description": "Content of template.",
|
|
"type": ["object", "string"],
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the template, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the template.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"title": {
|
|
"description": "Title of template.",
|
|
"type": ["object", "string"],
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the template, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the template, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "Description of template.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"status": {
|
|
"description": "Status of template.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"default": "publish",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"wp_id": {
|
|
"description": "Post ID.",
|
|
"type": "integer",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"has_theme_file": {
|
|
"description": "Theme file exists.",
|
|
"type": "bool",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"author": {
|
|
"description": "The ID for the author of the template.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the template was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"author_text": {
|
|
"type": "string",
|
|
"description": "Human readable text for the author.",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"original_source": {
|
|
"description": "From where the template originally comes, eg 'theme'",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"],
|
|
"enum": ["theme", "plugin", "site", "user"]
|
|
},
|
|
"is_custom": {
|
|
"description": "Whether a template is a custom template.",
|
|
"type": "bool",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"wp_template_part": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_template_part",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "ID of template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "Unique slug identifying the template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"required": true,
|
|
"minLength": 1,
|
|
"pattern": "[a-zA-Z0-9_\\%-]+"
|
|
},
|
|
"theme": {
|
|
"description": "Theme identifier for the template.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"type": { "description": "Type of template.", "type": "string", "context": ["embed", "view", "edit"] },
|
|
"source": {
|
|
"description": "Source of template",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"origin": {
|
|
"description": "Source of a customised template",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"content": {
|
|
"description": "Content of template.",
|
|
"type": ["object", "string"],
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the template, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the template.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"title": {
|
|
"description": "Title of template.",
|
|
"type": ["object", "string"],
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the template, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the template, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "Description of template.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"status": {
|
|
"description": "Status of template.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"default": "publish",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"wp_id": {
|
|
"description": "Post ID.",
|
|
"type": "integer",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"has_theme_file": {
|
|
"description": "Theme file exists.",
|
|
"type": "bool",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"author": {
|
|
"description": "The ID for the author of the template.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the template was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"author_text": {
|
|
"type": "string",
|
|
"description": "Human readable text for the author.",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"original_source": {
|
|
"description": "From where the template originally comes, eg 'theme'",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"],
|
|
"enum": ["theme", "plugin", "site", "user"]
|
|
},
|
|
"area": {
|
|
"description": "Where the template part is intended for use (header, footer, etc)",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"wp_global_styles-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_global_styles-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"id": {
|
|
"description": "ID of global styles config.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"styles": { "description": "Global styles.", "type": ["object"], "context": ["view", "edit"] },
|
|
"settings": { "description": "Global settings.", "type": ["object"], "context": ["view", "edit"] }
|
|
}
|
|
},
|
|
"wp_global_styles": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_global_styles",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "ID of global styles config.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"styles": { "description": "Global styles.", "type": ["object"], "context": ["view", "edit"] },
|
|
"settings": { "description": "Global settings.", "type": ["object"], "context": ["view", "edit"] },
|
|
"title": {
|
|
"description": "Title of the global styles variation.",
|
|
"type": ["object", "string"],
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the global styles variation, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"wp_navigation": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_navigation",
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"description": "The date the post was published, in the site's time zone.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the post was published, as GMT.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"link": {
|
|
"description": "URL to the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"modified": {
|
|
"description": "The date the post was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the post was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "A named status for the object.",
|
|
"type": "string",
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft"
|
|
],
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"type": {
|
|
"description": "Type of post.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"password": {
|
|
"description": "A password to protect access to the content and excerpt.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"template": {
|
|
"description": "The theme file to use to display the post.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
}
|
|
},
|
|
"links": [
|
|
{
|
|
"rel": "https:/api.w.org/action-publish",
|
|
"title": "The current user can publish this post.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/navigation/{id}",
|
|
"targetSchema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "string", "enum": ["publish", "future"] } }
|
|
}
|
|
},
|
|
{
|
|
"rel": "https:/api.w.org/action-unfiltered-html",
|
|
"title": "The current user can post unfiltered HTML markup and JavaScript.",
|
|
"href": "https:/haikuatelier.fr.ddev.site/wp-json/wp/v2/navigation/{id}",
|
|
"targetSchema": { "type": "object", "properties": { "content": { "raw": { "type": "string" } } } }
|
|
}
|
|
]
|
|
},
|
|
"wp_navigation-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_navigation-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"wp_font_family": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_font_family",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"theme_json_version": {
|
|
"description": "Version of the theme.json schema used for the typography settings.",
|
|
"type": "integer",
|
|
"default": 3,
|
|
"minimum": 2,
|
|
"maximum": 3,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"font_faces": {
|
|
"description": "The IDs of the child font faces in the font family.",
|
|
"type": "array",
|
|
"context": ["view", "edit", "embed"],
|
|
"items": { "type": "integer" }
|
|
},
|
|
"font_family_settings": {
|
|
"description": "font-face definition in theme.json format.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"name": { "description": "Name of the font family preset, translatable.", "type": "string" },
|
|
"slug": { "description": "Kebab-case unique identifier for the font family preset.", "type": "string" },
|
|
"fontFamily": { "description": "CSS font-family value.", "type": "string" },
|
|
"preview": {
|
|
"description": "URL to a preview image of the font family.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"default": ""
|
|
}
|
|
},
|
|
"required": ["name", "slug", "fontFamily"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"wp_font_face": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_font_face",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the post.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"theme_json_version": {
|
|
"description": "Version of the theme.json schema used for the typography settings.",
|
|
"type": "integer",
|
|
"default": 3,
|
|
"minimum": 2,
|
|
"maximum": 3,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent font family of the font face.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"font_face_settings": {
|
|
"description": "font-face declaration in theme.json format.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"fontFamily": { "description": "CSS font-family value.", "type": "string", "default": "" },
|
|
"fontStyle": { "description": "CSS font-style value.", "type": "string", "default": "normal" },
|
|
"fontWeight": {
|
|
"description": "List of available font weights, separated by a space.",
|
|
"default": "400",
|
|
"type": ["string", "integer"]
|
|
},
|
|
"fontDisplay": {
|
|
"description": "CSS font-display value.",
|
|
"type": "string",
|
|
"default": "fallback",
|
|
"enum": ["auto", "block", "fallback", "swap", "optional"]
|
|
},
|
|
"src": {
|
|
"description": "Paths or URLs to the font files.",
|
|
"anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }],
|
|
"default": []
|
|
},
|
|
"fontStretch": { "description": "CSS font-stretch value.", "type": "string" },
|
|
"ascentOverride": { "description": "CSS ascent-override value.", "type": "string" },
|
|
"descentOverride": { "description": "CSS descent-override value.", "type": "string" },
|
|
"fontVariant": { "description": "CSS font-variant value.", "type": "string" },
|
|
"fontFeatureSettings": { "description": "CSS font-feature-settings value.", "type": "string" },
|
|
"fontVariationSettings": { "description": "CSS font-variation-settings value.", "type": "string" },
|
|
"lineGapOverride": { "description": "CSS line-gap-override value.", "type": "string" },
|
|
"sizeAdjust": { "description": "CSS size-adjust value.", "type": "string" },
|
|
"unicodeRange": { "description": "CSS unicode-range value.", "type": "string" },
|
|
"preview": {
|
|
"description": "URL to a preview image of the font face.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"default": ""
|
|
}
|
|
},
|
|
"required": ["fontFamily", "src"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"product-revision": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "product-revision",
|
|
"type": "object",
|
|
"properties": {
|
|
"author": {
|
|
"description": "The ID for the author of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date": {
|
|
"description": "The date the revision was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the revision was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"guid": {
|
|
"description": "The globally unique identifier for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "GUID for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"rendered": {
|
|
"description": "GUID for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"modified": {
|
|
"description": "The date the revision was last modified, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"modified_gmt": {
|
|
"description": "The date the revision was last modified, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the revision.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the revision unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The title for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Title for the object, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML title for the object, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"description": "The content for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_version": {
|
|
"description": "Version of the content block format used by the post.",
|
|
"type": "integer",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the content is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"excerpt": {
|
|
"description": "The excerpt for the post.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Excerpt for the post, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML excerpt for the post, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether the excerpt is protected with a password.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"preview_link": {
|
|
"description": "Preview link for the post.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "type",
|
|
"type": "object",
|
|
"properties": {
|
|
"capabilities": {
|
|
"description": "All capabilities used by the post type.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human-readable description of the post type.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"hierarchical": {
|
|
"description": "Whether or not the post type should have children.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"viewable": {
|
|
"description": "Whether or not the post type can be viewed.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"labels": {
|
|
"description": "Human-readable labels for the post type for various contexts.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The title for the post type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the post type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"supports": {
|
|
"description": "All features, supported by the post type.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"has_archive": {
|
|
"description": "If the value is a string, the value will be used as the archive slug. If the value is false the post type has no archive.",
|
|
"type": ["string", "boolean"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"taxonomies": {
|
|
"description": "Taxonomies associated with post type.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rest_base": {
|
|
"description": "REST base route for the post type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"rest_namespace": {
|
|
"description": "REST route's namespace for the post type.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"visibility": {
|
|
"description": "The visibility settings for the post type.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"show_ui": {
|
|
"description": "Whether to generate a default UI for managing this post type.",
|
|
"type": "boolean"
|
|
},
|
|
"show_in_nav_menus": {
|
|
"description": "Whether to make the post type available for selection in navigation menus.",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"icon": {
|
|
"description": "The icon for the post type.",
|
|
"type": ["string", "null"],
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"template": {
|
|
"type": ["array"],
|
|
"description": "The block template associated with the post type.",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"template_lock": {
|
|
"type": ["string", "boolean"],
|
|
"enum": ["all", "insert", "contentOnly", false],
|
|
"description": "The template_lock associated with the post type, or false if none.",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
}
|
|
}
|
|
},
|
|
"status": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "status",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The title for the status.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"private": {
|
|
"description": "Whether posts with this status should be private.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"protected": {
|
|
"description": "Whether posts with this status should be protected.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"public": {
|
|
"description": "Whether posts of this status should be shown in the front end of the site.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"queryable": {
|
|
"description": "Whether posts with this status should be publicly-queryable.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"show_in_list": {
|
|
"description": "Whether to include posts in the edit listing for their post type.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the status.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"date_floating": {
|
|
"description": "Whether posts of this status may have floating published dates.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"taxonomy": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "taxonomy",
|
|
"type": "object",
|
|
"properties": {
|
|
"capabilities": {
|
|
"description": "All capabilities used by the taxonomy.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "A human-readable description of the taxonomy.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"hierarchical": {
|
|
"description": "Whether or not the taxonomy should have children.",
|
|
"type": "boolean",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"labels": {
|
|
"description": "Human-readable labels for the taxonomy for various contexts.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The title for the taxonomy.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the taxonomy.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"show_cloud": {
|
|
"description": "Whether or not the term cloud should be displayed.",
|
|
"type": "boolean",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"types": {
|
|
"description": "Types associated with the taxonomy.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"rest_base": {
|
|
"description": "REST base route for the taxonomy.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"rest_namespace": {
|
|
"description": "REST namespace route for the taxonomy.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"visibility": {
|
|
"description": "The visibility settings for the taxonomy.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"public": {
|
|
"description": "Whether a taxonomy is intended for use publicly either via the admin interface or by front end users.",
|
|
"type": "boolean"
|
|
},
|
|
"publicly_queryable": { "description": "Whether the taxonomy is publicly queryable.", "type": "boolean" },
|
|
"show_ui": {
|
|
"description": "Whether to generate a default UI for managing this taxonomy.",
|
|
"type": "boolean"
|
|
},
|
|
"show_admin_column": {
|
|
"description": "Whether to allow automatic creation of taxonomy columns on associated post types table.",
|
|
"type": "boolean"
|
|
},
|
|
"show_in_nav_menus": {
|
|
"description": "Whether to make the taxonomy available for selection in navigation menus.",
|
|
"type": "boolean"
|
|
},
|
|
"show_in_quick_edit": {
|
|
"description": "Whether to show the taxonomy in the Quick/Bulk edit panel.",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"category": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "category",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of published posts for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL of the term.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"taxonomy": {
|
|
"description": "Type attribution for the term.",
|
|
"type": "string",
|
|
"enum": ["category"],
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": { "description": "The parent term ID.", "type": "integer", "context": ["view", "edit"] },
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"tag": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "tag",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of published posts for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL of the term.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"taxonomy": {
|
|
"description": "Type attribution for the term.",
|
|
"type": "string",
|
|
"enum": ["post_tag"],
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"nav_menu": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "nav_menu",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] },
|
|
"locations": {
|
|
"description": "The locations assigned to the menu.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit"]
|
|
},
|
|
"auto_add": {
|
|
"description": "Whether to automatically add top-level pages to this menu.",
|
|
"context": ["view", "edit"],
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"wp_pattern_category": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp_pattern_category",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"count": {
|
|
"description": "Number of published posts for the term.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "HTML description of the term.",
|
|
"type": "string",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL of the term.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "HTML title for the term.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"],
|
|
"required": true
|
|
},
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the term unique to its type.",
|
|
"type": "string",
|
|
"context": ["view", "embed", "edit"]
|
|
},
|
|
"taxonomy": {
|
|
"description": "Type attribution for the term.",
|
|
"type": "string",
|
|
"enum": ["wp_pattern_category"],
|
|
"context": ["view", "embed", "edit"],
|
|
"readonly": true
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"user": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "user",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the user.",
|
|
"type": "integer",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"username": {
|
|
"description": "Login name for the user.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"required": true
|
|
},
|
|
"name": {
|
|
"description": "Display name for the user.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"first_name": { "description": "First name for the user.", "type": "string", "context": ["edit"] },
|
|
"last_name": { "description": "Last name for the user.", "type": "string", "context": ["edit"] },
|
|
"email": {
|
|
"description": "The email address for the user.",
|
|
"type": "string",
|
|
"format": "email",
|
|
"context": ["edit"],
|
|
"required": true
|
|
},
|
|
"url": {
|
|
"description": "URL of the user.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"description": {
|
|
"description": "Description of the user.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "Author URL of the user.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"locale": {
|
|
"description": "Locale for the user.",
|
|
"type": "string",
|
|
"enum": ["", "en_US", "en_GB", "fr_BE", "fr_FR"],
|
|
"context": ["edit"]
|
|
},
|
|
"nickname": { "description": "The nickname for the user.", "type": "string", "context": ["edit"] },
|
|
"slug": {
|
|
"description": "An alphanumeric identifier for the user.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"registered_date": {
|
|
"description": "Registration date for the user.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"roles": {
|
|
"description": "Roles assigned to the user.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"context": ["edit"]
|
|
},
|
|
"password": {
|
|
"description": "Password for the user (never included).",
|
|
"type": "string",
|
|
"context": [],
|
|
"required": true
|
|
},
|
|
"capabilities": {
|
|
"description": "All capabilities assigned to the user.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"extra_capabilities": {
|
|
"description": "Any extra capabilities assigned to the user.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"avatar_urls": {
|
|
"description": "Avatar URLs for the user.",
|
|
"type": "object",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"24": {
|
|
"description": "Avatar URL with image size of 24 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"48": {
|
|
"description": "Avatar URL with image size of 48 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"96": {
|
|
"description": "Avatar URL with image size of 96 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"description": "Meta fields.",
|
|
"type": "object",
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"persisted_preferences": {
|
|
"type": "object",
|
|
"description": "",
|
|
"default": [],
|
|
"context": ["edit"],
|
|
"properties": {
|
|
"_modified": {
|
|
"description": "The date and time the preferences were updated.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"readonly": false
|
|
}
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"woocommerce_launch_your_store_tour_hidden": {
|
|
"type": "string",
|
|
"description": "Indicate whether the user has dismissed the site visibility tour on the home screen.",
|
|
"default": ""
|
|
},
|
|
"woocommerce_coming_soon_banner_dismissed": {
|
|
"type": "string",
|
|
"description": "Indicate whether the user has dismissed the coming soon notice or not.",
|
|
"default": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application-password": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "application-password",
|
|
"type": "object",
|
|
"properties": {
|
|
"uuid": {
|
|
"description": "The unique identifier for the application password.",
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"app_id": {
|
|
"description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.",
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"name": {
|
|
"description": "The name of the application password.",
|
|
"type": "string",
|
|
"required": true,
|
|
"context": ["view", "edit", "embed"],
|
|
"minLength": 1,
|
|
"pattern": ".*\\S.*"
|
|
},
|
|
"password": {
|
|
"description": "The generated password. Only available after adding an application.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"created": {
|
|
"description": "The GMT date the application password was created.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"last_used": {
|
|
"description": "The GMT date the application password was last used.",
|
|
"type": ["string", "null"],
|
|
"format": "date-time",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"last_ip": {
|
|
"description": "The IP address the application password was last used by.",
|
|
"type": ["string", "null"],
|
|
"format": "ip",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"comment": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "comment",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the comment.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"author": {
|
|
"description": "The ID of the user object, if author was a user.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"author_email": {
|
|
"description": "Email address for the comment author.",
|
|
"type": "string",
|
|
"format": "email",
|
|
"context": ["edit"]
|
|
},
|
|
"author_ip": {
|
|
"description": "IP address for the comment author.",
|
|
"type": "string",
|
|
"format": "ip",
|
|
"context": ["edit"]
|
|
},
|
|
"author_name": {
|
|
"description": "Display name for the comment author.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"author_url": {
|
|
"description": "URL for the comment author.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"author_user_agent": {
|
|
"description": "User agent for the comment author.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"content": {
|
|
"description": "The content for the comment.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"properties": {
|
|
"raw": {
|
|
"description": "Content for the comment, as it exists in the database.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML content for the comment, transformed for display.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"date": {
|
|
"description": "The date the comment was published, in the site's time zone.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"date_gmt": {
|
|
"description": "The date the comment was published, as GMT.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view", "edit"]
|
|
},
|
|
"link": {
|
|
"description": "URL to the comment.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"parent": {
|
|
"description": "The ID for the parent of the comment.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"default": 0
|
|
},
|
|
"post": {
|
|
"description": "The ID of the associated post object.",
|
|
"type": "integer",
|
|
"context": ["view", "edit"],
|
|
"default": 0
|
|
},
|
|
"status": { "description": "State of the comment.", "type": "string", "context": ["view", "edit"] },
|
|
"type": {
|
|
"description": "Type of the comment.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"author_avatar_urls": {
|
|
"description": "Avatar URLs for the comment author.",
|
|
"type": "object",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true,
|
|
"properties": {
|
|
"24": {
|
|
"description": "Avatar URL with image size of 24 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"48": {
|
|
"description": "Avatar URL with image size of 48 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
},
|
|
"96": {
|
|
"description": "Avatar URL with image size of 96 pixels.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["embed", "view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"meta": { "description": "Meta fields.", "type": "object", "context": ["view", "edit"], "properties": [] }
|
|
}
|
|
},
|
|
"search-result": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "search-result",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the object.",
|
|
"type": ["integer", "string"],
|
|
"context": ["view", "embed"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "The title for the object.",
|
|
"type": "string",
|
|
"context": ["view", "embed"],
|
|
"readonly": true
|
|
},
|
|
"url": {
|
|
"description": "URL to the object.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"context": ["view", "embed"],
|
|
"readonly": true
|
|
},
|
|
"type": {
|
|
"description": "Object type.",
|
|
"type": "string",
|
|
"enum": ["post", "term", "post-format"],
|
|
"context": ["view", "embed"],
|
|
"readonly": true
|
|
},
|
|
"subtype": {
|
|
"description": "Object subtype.",
|
|
"type": "string",
|
|
"enum": ["post", "page", "product", "category", "post_tag", "product_cat", "product_tag"],
|
|
"context": ["view", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"rendered-block": {
|
|
"$schema": "http:/json-schema.org/schema#",
|
|
"title": "rendered-block",
|
|
"type": "object",
|
|
"properties": {
|
|
"rendered": { "description": "The rendered block.", "type": "string", "required": true, "context": ["edit"] }
|
|
}
|
|
},
|
|
"block-type": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "block-type",
|
|
"type": "object",
|
|
"properties": {
|
|
"api_version": {
|
|
"description": "Version of block API.",
|
|
"type": "integer",
|
|
"default": 1,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"title": {
|
|
"description": "Title of block type.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Unique name identifying the block type.",
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$",
|
|
"required": true,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of block type.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"icon": {
|
|
"description": "Icon of block type.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"attributes": {
|
|
"description": "Block attributes.",
|
|
"type": ["object", "null"],
|
|
"properties": [],
|
|
"default": null,
|
|
"additionalProperties": { "type": "object" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"provides_context": {
|
|
"description": "Context provided by blocks of this type.",
|
|
"type": "object",
|
|
"properties": [],
|
|
"additionalProperties": { "type": "string" },
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"uses_context": {
|
|
"description": "Context values inherited by blocks of this type.",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"selectors": {
|
|
"description": "Custom CSS selectors.",
|
|
"type": "object",
|
|
"default": [],
|
|
"properties": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"supports": {
|
|
"description": "Block supports.",
|
|
"type": "object",
|
|
"default": [],
|
|
"properties": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"category": {
|
|
"description": "Block category.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"is_dynamic": {
|
|
"description": "Is the block dynamically rendered.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"editor_script_handles": {
|
|
"description": "Editor script handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"script_handles": {
|
|
"description": "Public facing and editor script handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"view_script_handles": {
|
|
"description": "Public facing script handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"view_script_module_ids": {
|
|
"description": "Public-facing script module IDs.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"editor_style_handles": {
|
|
"description": "Editor style handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"style_handles": {
|
|
"description": "Public facing and editor style handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"view_style_handles": {
|
|
"description": "Public-facing style handles.",
|
|
"type": ["array"],
|
|
"default": [],
|
|
"items": { "type": "string" },
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"styles": {
|
|
"description": "Block style variations.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "description": "Unique name identifying the style.", "type": "string", "required": true },
|
|
"label": { "description": "The human-readable label for the style.", "type": "string" },
|
|
"inline_style": {
|
|
"description": "Inline CSS code that registers the CSS class required for the style.",
|
|
"type": "string"
|
|
},
|
|
"style_handle": { "description": "Contains the handle that defines the block style.", "type": "string" }
|
|
}
|
|
},
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"variations": {
|
|
"description": "Block variations.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "description": "The unique and machine-readable name.", "type": "string", "required": true },
|
|
"title": { "description": "A human-readable variation title.", "type": "string", "required": true },
|
|
"description": {
|
|
"description": "A detailed variation description.",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
"category": {
|
|
"description": "Block category.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"icon": {
|
|
"description": "Icon of block type.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"isDefault": {
|
|
"description": "Indicates whether the current variation is the default one.",
|
|
"type": "boolean",
|
|
"required": false,
|
|
"default": false
|
|
},
|
|
"attributes": { "description": "The initial values for attributes.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "The list of inner blocks used in the example.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the inner block.",
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$",
|
|
"required": true
|
|
},
|
|
"attributes": { "description": "The attributes of the inner block.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "A list of the inner block's own inner blocks. This is a recursive definition following the parent innerBlocks schema.",
|
|
"type": "array"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"description": "Block example.",
|
|
"type": ["object", "null"],
|
|
"default": null,
|
|
"properties": {
|
|
"attributes": { "description": "The attributes used in the example.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "The list of inner blocks used in the example.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the inner block.",
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$",
|
|
"required": true
|
|
},
|
|
"attributes": { "description": "The attributes of the inner block.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "A list of the inner block's own inner blocks. This is a recursive definition following the parent innerBlocks schema.",
|
|
"type": "array"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"scope": {
|
|
"description": "The list of scopes where the variation is applicable. When not provided, it assumes all available scopes.",
|
|
"type": ["array", "null"],
|
|
"default": null,
|
|
"items": { "type": "string", "enum": ["block", "inserter", "transform"] },
|
|
"readonly": true
|
|
},
|
|
"keywords": {
|
|
"description": "Block keywords.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"readonly": true,
|
|
"context": ["embed", "view", "edit"],
|
|
"default": null
|
|
},
|
|
"textdomain": {
|
|
"description": "Public text domain.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"parent": {
|
|
"description": "Parent blocks.",
|
|
"type": ["array", "null"],
|
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$" },
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"ancestor": {
|
|
"description": "Ancestor blocks.",
|
|
"type": ["array", "null"],
|
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$" },
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"allowed_blocks": {
|
|
"description": "Allowed child block types.",
|
|
"type": ["array", "null"],
|
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$" },
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"keywords": {
|
|
"description": "Block keywords.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"example": {
|
|
"description": "Block example.",
|
|
"type": ["object", "null"],
|
|
"default": null,
|
|
"properties": {
|
|
"attributes": { "description": "The attributes used in the example.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "The list of inner blocks used in the example.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the inner block.",
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$",
|
|
"required": true
|
|
},
|
|
"attributes": { "description": "The attributes of the inner block.", "type": "object" },
|
|
"innerBlocks": {
|
|
"description": "A list of the inner block's own inner blocks. This is a recursive definition following the parent innerBlocks schema.",
|
|
"type": "array"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"block_hooks": {
|
|
"description": "This block is automatically inserted near any occurrence of the block types used as keys of this map, into a relative position given by the corresponding value.",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$": {
|
|
"type": "string",
|
|
"enum": ["before", "after", "first_child", "last_child"]
|
|
}
|
|
},
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"editor_script": {
|
|
"description": "Editor script handle. DEPRECATED: Use `editor_script_handles` instead.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"script": {
|
|
"description": "Public facing and editor script handle. DEPRECATED: Use `script_handles` instead.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"view_script": {
|
|
"description": "Public facing script handle. DEPRECATED: Use `view_script_handles` instead.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"editor_style": {
|
|
"description": "Editor style handle. DEPRECATED: Use `editor_style_handles` instead.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"style": {
|
|
"description": "Public facing and editor style handle. DEPRECATED: Use `style_handles` instead.",
|
|
"type": ["string", "null"],
|
|
"default": null,
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"settings": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "settings",
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "title": "Title", "description": "Site title.", "default": null },
|
|
"description": { "type": "string", "title": "Tagline", "description": "Site tagline.", "default": null },
|
|
"url": { "type": "string", "title": "", "description": "Site URL.", "default": null, "format": "uri" },
|
|
"email": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "This address is used for admin purposes, like new user notification.",
|
|
"default": null,
|
|
"format": "email"
|
|
},
|
|
"timezone": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "A city in the same timezone as you.",
|
|
"default": null
|
|
},
|
|
"date_format": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "A date format for all date strings.",
|
|
"default": null
|
|
},
|
|
"time_format": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "A time format for all time strings.",
|
|
"default": null
|
|
},
|
|
"start_of_week": {
|
|
"type": "integer",
|
|
"title": "",
|
|
"description": "A day number of the week that the week should start on.",
|
|
"default": null
|
|
},
|
|
"language": { "type": "string", "title": "", "description": "WordPress locale code.", "default": "en_US" },
|
|
"use_smilies": {
|
|
"type": "boolean",
|
|
"title": "",
|
|
"description": "Convert emoticons like :-) and :-P to graphics on display.",
|
|
"default": true
|
|
},
|
|
"default_category": {
|
|
"type": "integer",
|
|
"title": "",
|
|
"description": "Default post category.",
|
|
"default": null
|
|
},
|
|
"default_post_format": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "Default post format.",
|
|
"default": null
|
|
},
|
|
"posts_per_page": {
|
|
"type": "integer",
|
|
"title": "Maximum posts per page",
|
|
"description": "Blog pages show at most.",
|
|
"default": 10
|
|
},
|
|
"show_on_front": {
|
|
"type": "string",
|
|
"title": "Show on front",
|
|
"description": "What to show on the front page",
|
|
"default": null
|
|
},
|
|
"page_on_front": {
|
|
"type": "integer",
|
|
"title": "Page on front",
|
|
"description": "The ID of the page that should be displayed on the front page",
|
|
"default": null
|
|
},
|
|
"page_for_posts": {
|
|
"type": "integer",
|
|
"title": "",
|
|
"description": "The ID of the page that should display the latest posts",
|
|
"default": null
|
|
},
|
|
"default_ping_status": {
|
|
"type": "string",
|
|
"title": "",
|
|
"description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.",
|
|
"default": null,
|
|
"enum": ["open", "closed"]
|
|
},
|
|
"default_comment_status": {
|
|
"type": "string",
|
|
"title": "Allow comments on new posts",
|
|
"description": "Allow people to submit comments on new posts.",
|
|
"default": null,
|
|
"enum": ["open", "closed"]
|
|
},
|
|
"site_logo": { "type": "integer", "title": "Logo", "description": "Site logo.", "default": null },
|
|
"site_icon": { "type": "integer", "title": "Icon", "description": "Site icon.", "default": null },
|
|
"pickup_location_settings": {
|
|
"type": "object",
|
|
"title": "",
|
|
"description": "WooCommerce Local Pickup Method Settings",
|
|
"default": [],
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "If enabled, this method will appear on the block based checkout.",
|
|
"type": "string",
|
|
"enum": ["yes", "no"]
|
|
},
|
|
"title": {
|
|
"description": "This controls the title which the user sees during checkout.",
|
|
"type": "string"
|
|
},
|
|
"tax_status": {
|
|
"description": "If a cost is defined, this controls if taxes are applied to that cost.",
|
|
"type": "string",
|
|
"enum": ["taxable", "none"]
|
|
},
|
|
"cost": { "description": "Optional cost to charge for local pickup.", "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"pickup_locations": {
|
|
"type": "array",
|
|
"title": "",
|
|
"description": "WooCommerce Local Pickup Locations",
|
|
"default": [],
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"address": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address_1": { "type": "string" },
|
|
"city": { "type": "string" },
|
|
"state": { "type": "string" },
|
|
"postcode": { "type": "string" },
|
|
"country": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"details": { "type": "string" },
|
|
"enabled": { "type": "boolean" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"theme": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "theme",
|
|
"type": "object",
|
|
"properties": {
|
|
"stylesheet": {
|
|
"description": "The theme's style sheet. This uniquely identifies the theme.",
|
|
"type": "string",
|
|
"readonly": true
|
|
},
|
|
"stylesheet_uri": {
|
|
"description": "The URI for the theme's style sheet directory.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"readonly": true
|
|
},
|
|
"template": {
|
|
"description": "The theme's template. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's style sheet.",
|
|
"type": "string",
|
|
"readonly": true
|
|
},
|
|
"template_uri": {
|
|
"description": "The URI for the theme's template directory. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme's style sheet directory.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"readonly": true
|
|
},
|
|
"author": {
|
|
"description": "The theme author.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": { "description": "The theme author's name, as found in the theme header.", "type": "string" },
|
|
"rendered": { "description": "HTML for the theme author, transformed for display.", "type": "string" }
|
|
}
|
|
},
|
|
"author_uri": {
|
|
"description": "The website of the theme author.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "The website of the theme author, as found in the theme header.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"rendered": {
|
|
"description": "The website of the theme author, transformed for display.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
}
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "A description of the theme.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": { "description": "The theme description, as found in the theme header.", "type": "string" },
|
|
"rendered": { "description": "The theme description, transformed for display.", "type": "string" }
|
|
}
|
|
},
|
|
"is_block_theme": {
|
|
"description": "Whether the theme is a block-based theme.",
|
|
"type": "boolean",
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The name of the theme.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": { "description": "The theme name, as found in the theme header.", "type": "string" },
|
|
"rendered": { "description": "The theme name, transformed for display.", "type": "string" }
|
|
}
|
|
},
|
|
"requires_php": {
|
|
"description": "The minimum PHP version required for the theme to work.",
|
|
"type": "string",
|
|
"readonly": true
|
|
},
|
|
"requires_wp": {
|
|
"description": "The minimum WordPress version required for the theme to work.",
|
|
"type": "string",
|
|
"readonly": true
|
|
},
|
|
"screenshot": {
|
|
"description": "The theme's screenshot URL.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"readonly": true
|
|
},
|
|
"tags": {
|
|
"description": "Tags indicating styles and features of the theme.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "The theme tags, as found in the theme header.",
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
},
|
|
"rendered": { "description": "The theme tags, transformed for display.", "type": "string" }
|
|
}
|
|
},
|
|
"textdomain": { "description": "The theme's text domain.", "type": "string", "readonly": true },
|
|
"theme_supports": {
|
|
"description": "Features supported by this theme.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"align-wide": {
|
|
"description": "Whether theme opts in to wide alignment CSS class.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"automatic-feed-links": {
|
|
"description": "Whether posts and comments RSS feed links are added to head.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"block-templates": {
|
|
"description": "Whether a theme uses block-based templates.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"block-template-parts": {
|
|
"description": "Whether a theme uses block-based template parts.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"custom-background": {
|
|
"description": "Custom background if defined by the theme.",
|
|
"type": ["boolean", "object"],
|
|
"default": false,
|
|
"properties": {
|
|
"default-image": { "type": "string", "format": "uri" },
|
|
"default-preset": { "type": "string", "enum": ["default", "fill", "fit", "repeat", "custom"] },
|
|
"default-position-x": { "type": "string", "enum": ["left", "center", "right"] },
|
|
"default-position-y": { "type": "string", "enum": ["left", "center", "right"] },
|
|
"default-size": { "type": "string", "enum": ["auto", "contain", "cover"] },
|
|
"default-repeat": { "type": "string", "enum": ["repeat-x", "repeat-y", "repeat", "no-repeat"] },
|
|
"default-attachment": { "type": "string", "enum": ["scroll", "fixed"] },
|
|
"default-color": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"custom-header": {
|
|
"description": "Custom header if defined by the theme.",
|
|
"type": ["boolean", "object"],
|
|
"default": false,
|
|
"properties": {
|
|
"default-image": { "type": "string", "format": "uri" },
|
|
"random-default": { "type": "boolean" },
|
|
"width": { "type": "integer" },
|
|
"height": { "type": "integer" },
|
|
"flex-height": { "type": "boolean" },
|
|
"flex-width": { "type": "boolean" },
|
|
"default-text-color": { "type": "string" },
|
|
"header-text": { "type": "boolean" },
|
|
"uploads": { "type": "boolean" },
|
|
"video": { "type": "boolean" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"custom-logo": {
|
|
"description": "Custom logo if defined by the theme.",
|
|
"type": ["boolean", "object"],
|
|
"default": false,
|
|
"properties": {
|
|
"width": { "type": "integer" },
|
|
"height": { "type": "integer" },
|
|
"flex-width": { "type": "boolean" },
|
|
"flex-height": { "type": "boolean" },
|
|
"header-text": { "type": "array", "items": { "type": "string" } },
|
|
"unlink-homepage-logo": { "type": "boolean" }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"customize-selective-refresh-widgets": {
|
|
"description": "Whether the theme enables Selective Refresh for Widgets being managed with the Customizer.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"dark-editor-style": {
|
|
"description": "Whether theme opts in to the dark editor style UI.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disable-custom-colors": {
|
|
"description": "Whether the theme disables custom colors.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disable-custom-font-sizes": {
|
|
"description": "Whether the theme disables custom font sizes.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disable-custom-gradients": {
|
|
"description": "Whether the theme disables custom gradients.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"disable-layout-styles": {
|
|
"description": "Whether the theme disables generated layout styles.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"editor-color-palette": {
|
|
"description": "Custom color palette if defined by the theme.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"slug": { "type": "string" },
|
|
"color": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"editor-font-sizes": {
|
|
"description": "Custom font sizes if defined by the theme.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"size": { "type": "number" },
|
|
"slug": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"editor-gradient-presets": {
|
|
"description": "Custom gradient presets if defined by the theme.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"gradient": { "type": "string" },
|
|
"slug": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"editor-spacing-sizes": {
|
|
"description": "Custom spacing sizes if defined by the theme.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"size": { "type": "string" },
|
|
"slug": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"editor-styles": {
|
|
"description": "Whether theme opts in to the editor styles CSS wrapper.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"html5": {
|
|
"description": "Allows use of HTML5 markup for search forms, comment forms, comment lists, gallery, and caption.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["search-form", "comment-form", "comment-list", "gallery", "caption", "script", "style"]
|
|
}
|
|
},
|
|
"formats": {
|
|
"description": "Post formats supported.",
|
|
"type": "array",
|
|
"default": ["standard"],
|
|
"items": {
|
|
"type": "string",
|
|
"enum": {
|
|
"standard": "standard",
|
|
"aside": "aside",
|
|
"chat": "chat",
|
|
"gallery": "gallery",
|
|
"link": "link",
|
|
"image": "image",
|
|
"quote": "quote",
|
|
"status": "status",
|
|
"video": "video",
|
|
"audio": "audio"
|
|
}
|
|
}
|
|
},
|
|
"post-thumbnails": {
|
|
"description": "The post types that support thumbnails or true if all post types are supported.",
|
|
"type": ["boolean", "array"],
|
|
"default": false,
|
|
"items": { "type": "string" }
|
|
},
|
|
"responsive-embeds": {
|
|
"description": "Whether the theme supports responsive embedded content.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"title-tag": {
|
|
"description": "Whether the theme can manage the document title tag.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"wp-block-styles": {
|
|
"description": "Whether theme opts in to default WordPress block styles for viewing.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"theme_uri": {
|
|
"description": "The URI of the theme's webpage.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"properties": {
|
|
"raw": {
|
|
"description": "The URI of the theme's webpage, as found in the theme header.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"rendered": {
|
|
"description": "The URI of the theme's webpage, transformed for display.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
}
|
|
}
|
|
},
|
|
"version": { "description": "The theme's current version.", "type": "string", "readonly": true },
|
|
"status": { "description": "A named status for the theme.", "type": "string", "enum": ["inactive", "active"] }
|
|
}
|
|
},
|
|
"plugin": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "plugin",
|
|
"type": "object",
|
|
"properties": {
|
|
"plugin": {
|
|
"description": "The plugin file.",
|
|
"type": "string",
|
|
"pattern": "[^.\\/]+(?:\\/[^.\\/]+)?",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"status": {
|
|
"description": "The plugin activation status.",
|
|
"type": "string",
|
|
"enum": ["inactive", "active"],
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"name": {
|
|
"description": "The plugin name.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"plugin_uri": {
|
|
"description": "The plugin's website address.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"readonly": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"author": {
|
|
"description": "The plugin author.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"author_uri": {
|
|
"description": "The plugin author's website address.",
|
|
"type": "string",
|
|
"format": "uri",
|
|
"readonly": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"description": {
|
|
"description": "The plugin description.",
|
|
"type": "object",
|
|
"readonly": true,
|
|
"context": ["view", "edit"],
|
|
"properties": {
|
|
"raw": { "description": "The raw plugin description.", "type": "string" },
|
|
"rendered": { "description": "The plugin description formatted for display.", "type": "string" }
|
|
}
|
|
},
|
|
"version": {
|
|
"description": "The plugin version number.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"]
|
|
},
|
|
"network_only": {
|
|
"description": "Whether the plugin can only be activated network wide.",
|
|
"type": "boolean",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"requires_wp": {
|
|
"description": "Minimum required version of WordPress.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"requires_php": {
|
|
"description": "Minimum required version of PHP.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"textdomain": {
|
|
"description": "The plugin's text domain.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"sidebar": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "sidebar",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "ID of sidebar.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Unique name identifying the sidebar.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of sidebar.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"class": {
|
|
"description": "Extra CSS class to assign to the sidebar in the Widgets interface.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"before_widget": {
|
|
"description": "HTML content to prepend to each widget's HTML output when assigned to this sidebar. Default is an opening list item element.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"after_widget": {
|
|
"description": "HTML content to append to each widget's HTML output when assigned to this sidebar. Default is a closing list item element.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"before_title": {
|
|
"description": "HTML content to prepend to the sidebar title when displayed. Default is an opening h2 element.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"after_title": {
|
|
"description": "HTML content to append to the sidebar title when displayed. Default is a closing h2 element.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"status": {
|
|
"description": "Status of sidebar.",
|
|
"type": "string",
|
|
"enum": ["active", "inactive"],
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"widgets": {
|
|
"description": "Nested widgets.",
|
|
"type": "array",
|
|
"items": { "type": ["object", "string"] },
|
|
"default": [],
|
|
"context": ["embed", "view", "edit"]
|
|
}
|
|
}
|
|
},
|
|
"widget-type": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "widget-type",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique slug identifying the widget type.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "Human-readable name identifying the widget type.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "Description of the widget.",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"is_multi": {
|
|
"description": "Whether the widget supports multiple instances",
|
|
"type": "boolean",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"classname": {
|
|
"description": "Class name",
|
|
"type": "string",
|
|
"default": "",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"widget": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "widget",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier for the widget.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"id_base": {
|
|
"description": "The type of the widget. Corresponds to ID in widget-types endpoint.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"sidebar": {
|
|
"description": "The sidebar to which the widget belongs.",
|
|
"type": "string",
|
|
"default": "wp_inactive_widgets",
|
|
"required": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"rendered": {
|
|
"description": "HTML representation of the widget.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"rendered_form": {
|
|
"description": "HTML representation of the widget admin form.",
|
|
"type": "string",
|
|
"context": ["edit"],
|
|
"readonly": true
|
|
},
|
|
"instance": {
|
|
"description": "Instance settings of the widget, if supported.",
|
|
"type": "object",
|
|
"context": ["edit"],
|
|
"default": null,
|
|
"properties": {
|
|
"encoded": {
|
|
"description": "Base64 encoded representation of the instance settings.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"hash": {
|
|
"description": "Cryptographic hash of the instance settings.",
|
|
"type": "string",
|
|
"context": ["edit"]
|
|
},
|
|
"raw": {
|
|
"description": "Unencoded instance settings, if supported.",
|
|
"type": "object",
|
|
"context": ["edit"]
|
|
}
|
|
}
|
|
},
|
|
"form_data": {
|
|
"description": "URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only.",
|
|
"type": "string",
|
|
"context": []
|
|
}
|
|
}
|
|
},
|
|
"block-directory-item": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "block-directory-item",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The block name, in namespace/block-name format.",
|
|
"type": "string",
|
|
"context": ["view"]
|
|
},
|
|
"title": {
|
|
"description": "The block title, in human readable format.",
|
|
"type": "string",
|
|
"context": ["view"]
|
|
},
|
|
"description": {
|
|
"description": "A short description of the block, in human readable format.",
|
|
"type": "string",
|
|
"context": ["view"]
|
|
},
|
|
"id": { "description": "The block slug.", "type": "string", "context": ["view"] },
|
|
"rating": { "description": "The star rating of the block.", "type": "number", "context": ["view"] },
|
|
"rating_count": { "description": "The number of ratings.", "type": "integer", "context": ["view"] },
|
|
"active_installs": {
|
|
"description": "The number of sites that have activated this block.",
|
|
"type": "integer",
|
|
"context": ["view"]
|
|
},
|
|
"author_block_rating": {
|
|
"description": "The average rating of blocks published by the same author.",
|
|
"type": "number",
|
|
"context": ["view"]
|
|
},
|
|
"author_block_count": {
|
|
"description": "The number of blocks published by the same author.",
|
|
"type": "integer",
|
|
"context": ["view"]
|
|
},
|
|
"author": {
|
|
"description": "The WordPress.org username of the block author.",
|
|
"type": "string",
|
|
"context": ["view"]
|
|
},
|
|
"icon": { "description": "The block icon.", "type": "string", "format": "uri", "context": ["view"] },
|
|
"last_updated": {
|
|
"description": "The date when the block was last updated.",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"context": ["view"]
|
|
},
|
|
"humanized_updated": {
|
|
"description": "The date when the block was last updated, in fuzzy human readable format.",
|
|
"type": "string",
|
|
"context": ["view"]
|
|
}
|
|
}
|
|
},
|
|
"pattern-directory-item": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "pattern-directory-item",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The pattern ID.",
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The pattern title, in human readable format.",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"content": {
|
|
"description": "The pattern content.",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"categories": {
|
|
"description": "The pattern's category slugs.",
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"keywords": {
|
|
"description": "The pattern's keywords.",
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": { "type": "string" },
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"description": {
|
|
"description": "A description of the pattern.",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"viewport_width": {
|
|
"description": "The preferred width of the viewport when previewing a pattern, in pixels.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"block_types": {
|
|
"description": "The block types which can use this pattern.",
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": { "type": "string" },
|
|
"context": ["view", "embed"]
|
|
}
|
|
}
|
|
},
|
|
"block-pattern": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "block-pattern",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The pattern name.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"title": {
|
|
"description": "The pattern title, in human readable format.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"content": {
|
|
"description": "The pattern content.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"description": {
|
|
"description": "The pattern detailed description.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"viewport_width": {
|
|
"description": "The pattern viewport width for inserter preview.",
|
|
"type": "number",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"inserter": {
|
|
"description": "Determines whether the pattern is visible in inserter.",
|
|
"type": "boolean",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"categories": {
|
|
"description": "The pattern's category slugs.",
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"keywords": {
|
|
"description": "The pattern keywords.",
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"block_types": {
|
|
"description": "Block types that the pattern is intended to be used with.",
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"post_types": {
|
|
"description": "An array of post types that the pattern is restricted to be used with.",
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"template_types": {
|
|
"description": "An array of template types where the pattern fits.",
|
|
"type": "array",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"source": {
|
|
"description": "Where the pattern comes from e.g. core",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"],
|
|
"enum": [
|
|
"core",
|
|
"plugin",
|
|
"theme",
|
|
"pattern-directory/core",
|
|
"pattern-directory/theme",
|
|
"pattern-directory/featured"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"block-pattern-category": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "block-pattern-category",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The category name.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"label": {
|
|
"description": "The category label, in human readable format.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"description": {
|
|
"description": "The category description in a human-readable format.",
|
|
"type": "string",
|
|
"readonly": true,
|
|
"context": ["view", "edit", "embed"]
|
|
}
|
|
}
|
|
},
|
|
"menu-location": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "menu-location",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the menu location.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"description": "The description of the menu location.",
|
|
"type": "string",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"menu": {
|
|
"description": "The ID of the assigned menu.",
|
|
"type": "integer",
|
|
"context": ["embed", "view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"font-collection": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "font-collection",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "Unique identifier for the font collection.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
},
|
|
"name": {
|
|
"description": "The name for the font collection.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"description": {
|
|
"description": "The description for the font collection.",
|
|
"type": "string",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"font_families": {
|
|
"description": "The font families for the font collection.",
|
|
"type": "array",
|
|
"context": ["view", "edit", "embed"]
|
|
},
|
|
"categories": {
|
|
"description": "The categories for the font collection.",
|
|
"type": "array",
|
|
"context": ["view", "edit", "embed"]
|
|
}
|
|
}
|
|
},
|
|
"wp-site-health-test": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "wp-site-health-test",
|
|
"type": "object",
|
|
"properties": {
|
|
"test": { "type": "string", "description": "The name of the test being run.", "readonly": true },
|
|
"label": { "type": "string", "description": "A label describing the test.", "readonly": true },
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the test.",
|
|
"enum": ["good", "recommended", "critical"],
|
|
"readonly": true
|
|
},
|
|
"badge": {
|
|
"type": "object",
|
|
"description": "The category this test is grouped in.",
|
|
"properties": {
|
|
"label": { "type": "string", "readonly": true },
|
|
"color": {
|
|
"type": "string",
|
|
"enum": ["blue", "orange", "red", "green", "purple", "gray"],
|
|
"readonly": true
|
|
}
|
|
},
|
|
"readonly": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "A more descriptive explanation of what the test looks for, and why it is important for the user.",
|
|
"readonly": true
|
|
},
|
|
"actions": {
|
|
"type": "string",
|
|
"description": "HTML containing an action to direct the user to where they can resolve the issue.",
|
|
"readonly": true
|
|
}
|
|
}
|
|
},
|
|
"navigation-fallback": {
|
|
"$schema": "http:/json-schema.org/draft-04/schema#",
|
|
"title": "navigation-fallback",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The unique identifier for the Navigation Menu.",
|
|
"type": "integer",
|
|
"context": ["view", "edit", "embed"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"paths": {
|
|
"/wc/v3": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/marketplace/featured": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wc/v3/marketplace/refresh": { "post": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wc/v3/marketplace/subscriptions": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wc/v3/marketplace/subscriptions/connect": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "product_key": { "type": "string", "required": true } },
|
|
"required": ["product_key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/marketplace/subscriptions/disconnect": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "product_key": { "type": "string", "required": true } },
|
|
"required": ["product_key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/marketplace/subscriptions/activate": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "product_key": { "type": "string", "required": true } },
|
|
"required": ["product_key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/marketplace/subscriptions/install-url": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "product_key", "in": "query", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc/v3/marketplace/create-order": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "product_id": { "required": true } },
|
|
"required": ["product_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific code.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "required": true, "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/coupons/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/coupons/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/customers/{customer_id}/downloads": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer_download" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "customer_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/customers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "registered_date"] }
|
|
},
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific email.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "role",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific role.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"all",
|
|
"administrator",
|
|
"editor",
|
|
"author",
|
|
"contributor",
|
|
"subscriber",
|
|
"customer",
|
|
"shop_manager"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "required": true, "description": "New user email address." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "required": false, "description": "New user username." },
|
|
"password": { "type": "string", "required": true, "description": "New user password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
},
|
|
"required": ["email", "password"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/customers/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
},
|
|
"reassign": { "type": "integer", "description": "ID to reassign posts to." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/customers/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/layout-templates": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "area",
|
|
"in": "query",
|
|
"description": "Area to get templates for.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/layout-templates/{id}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/orders/{order_id}/notes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result to customers or internal notes.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "customer", "internal"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"note": { "type": "string", "required": true, "description": "Order note content." },
|
|
"customer_note": {
|
|
"type": "boolean",
|
|
"description": "If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only."
|
|
},
|
|
"added_by_user": {
|
|
"type": "boolean",
|
|
"description": "If true, this note will be attributed to the current user. If false, the note will be attributed to the system."
|
|
}
|
|
},
|
|
"required": ["note"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders/{order_id}/notes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders/{order_id}/refunds": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": { "type": "string", "description": "Refund amount." },
|
|
"reason": { "type": "string", "description": "Reason for refund." },
|
|
"refunded_by": { "type": "integer", "description": "User ID of user who created the refund." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"api_refund": {
|
|
"type": "boolean",
|
|
"description": "When true, the payment gateway API is used to generate the refund."
|
|
},
|
|
"api_restock": { "type": "boolean", "description": "When true, refunded items are restocked." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders/{order_id}/refunds/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to orders which have specific statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"auto-draft",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific customer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/orders/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes/{attribute_id}/terms/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes/{attribute_id}/terms/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/attributes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/categories/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/custom-fields/names": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort items ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/products/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to reviews published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "id", "include", "product"] }
|
|
},
|
|
{
|
|
"name": "reviewer",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned to specific user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "reviewer_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes reviews assigned to specific user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "reviewer_email",
|
|
"in": "query",
|
|
"description": "Limit result set to that from a specific author email.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned to specific product IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "hold", "approved", "spam", "trash"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"required": true,
|
|
"description": "Unique identifier for the product."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "required": true, "description": "Name of the reviewer." },
|
|
"reviewer_email": { "type": "string", "required": true, "description": "Email of the reviewer." },
|
|
"review": { "type": "string", "required": true, "description": "Review content." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
},
|
|
"required": ["product_id", "reviewer", "reviewer_email", "review"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/reviews/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/reviews/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/shipping_classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/shipping_classes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/shipping_classes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/shipping_classes/slug-suggestion": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "name", "in": "query", "description": "Shipping class name.", "required": false, "schema": {} },
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "An alphanumeric identifier for the resource unique to its type.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "description",
|
|
"in": "query",
|
|
"description": "HTML description of the resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/products/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/tags/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/tags/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"modified",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"price",
|
|
"popularity",
|
|
"rating"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": { "enum": ["instock", "outofstock", "onbackorder"] }
|
|
},
|
|
{
|
|
"name": "search_sku",
|
|
"in": "query",
|
|
"description": "Limit results to those with a SKU that partially matches a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/suggested-products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"modified",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "in_stock",
|
|
"in": "query",
|
|
"description": "Limit result set to products in stock or out of stock.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result set to specific product categorie ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"in": "query",
|
|
"description": "Limit result set to specific product tag ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "Limit result set to specific amount of suggested products.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/products/{id}/duplicate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/{product_id}/variations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified", "menu_order"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": { "enum": ["instock", "outofstock", "onbackorder"] }
|
|
},
|
|
{
|
|
"name": "has_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products with or without price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": { "type": "string", "description": "Attribute slug." },
|
|
"term": { "type": "string", "description": "Attribute term." },
|
|
"terms": { "type": "array", "description": "Attribute terms." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/{product_id}/variations/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/{product_id}/variations/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/products/{product_id}/variations/generate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delete": { "type": "boolean", "description": "Deletes unused variations." },
|
|
"default_values": { "type": "object", "description": "Default values for generated variations." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/refunds": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/sales": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sales_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/top_sellers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/top_sellers_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/orders/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_order_total" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/products/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_product_total" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/customers/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_customer_total" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/coupons/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_coupon_total" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports/reviews/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_review_total" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/reports": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/settings": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting_group" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/settings/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/settings/{group_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/settings/{group_id}/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/settings/{group_id}/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping/zones": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping/zones/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping/zones/{id}/locations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping/zones/{zone_id}/methods": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." },
|
|
"method_id": { "required": true, "description": "Shipping method ID." }
|
|
},
|
|
"required": ["method_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping/zones/{zone_id}/methods/{instance_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/taxes/classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "name": { "type": "string", "required": true, "description": "Tax class name." } },
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/taxes/classes/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Unique slug for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Unique slug for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/taxes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "order", "priority"] }
|
|
},
|
|
{
|
|
"name": "class",
|
|
"in": "query",
|
|
"description": "Sort by tax class.",
|
|
"required": false,
|
|
"schema": { "enum": ["standard", "reduced-rate", "zero-rate"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/taxes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/taxes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/webhooks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "title"] }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to webhooks assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "active", "paused", "disabled"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "required": true, "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
},
|
|
"delivery_url": { "type": "string", "required": true, "description": "Webhook delivery URL." }
|
|
},
|
|
"required": ["topic", "delivery_url"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/webhooks/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/webhooks/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/system_status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/system_status/tools": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/system_status/tools/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/shipping_methods": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/shipping_methods/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/payment_gateways": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/payment_gateways/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data/continents": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_continents" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data/continents/{location}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_continents" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "continent",
|
|
"in": "query",
|
|
"description": "2 character continent code.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{ "name": "location", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/data/countries": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_countries" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data/countries/{location}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_countries" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "location",
|
|
"in": "path",
|
|
"description": "ISO3166 alpha-2 country code.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/data/currencies": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_currencies" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data/currencies/current": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_currencies" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v3/data/currencies/{currency}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_currencies" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "location",
|
|
"in": "query",
|
|
"description": "ISO4217 currency code.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{ "name": "currency", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v3/orders/{id}/receipt": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier of the order.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expiration_date": { "type": "string", "description": "Expiration date formatted as dd-mm-yyyy." },
|
|
"expiration_days": {
|
|
"type": "integer",
|
|
"description": "Number of days to be added to the current date to get the expiration date."
|
|
},
|
|
"force_new": {
|
|
"type": "boolean",
|
|
"required": false,
|
|
"description": "True to force the creation of a new receipt even if one already exists and has not expired yet."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier of the order.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp-openapi/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp-openapi/v1/schema": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} }]
|
|
}
|
|
},
|
|
"/jetpack/v4": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/jetpack/v4/verify_xmlrpc_error": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "nonce": { "type": "string", "required": true } },
|
|
"required": ["nonce"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jetpack/v4/verify_registration": {
|
|
"post": { "responses": { "200": { "description": "OK" } } },
|
|
"put": { "responses": { "200": { "description": "OK" } } },
|
|
"patch": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/jetpack/v4/remote_authorize": {
|
|
"post": { "responses": { "200": { "description": "OK" } } },
|
|
"put": { "responses": { "200": { "description": "OK" } } },
|
|
"patch": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/jetpack/v4/connection": {
|
|
"get": { "responses": { "200": { "description": "OK" } } },
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"isActive": { "required": true, "description": "Set to false will trigger the site to disconnect." }
|
|
},
|
|
"required": ["isActive"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"isActive": { "required": true, "description": "Set to false will trigger the site to disconnect." }
|
|
},
|
|
"required": ["isActive"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"isActive": { "required": true, "description": "Set to false will trigger the site to disconnect." }
|
|
},
|
|
"required": ["isActive"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jetpack/v4/connection/data": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/jetpack/v4/connection/plugins": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/jetpack/v4/connection/reconnect": {
|
|
"post": { "responses": { "200": { "description": "OK" } } },
|
|
"put": { "responses": { "200": { "description": "OK" } } },
|
|
"patch": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/jetpack/v4/connection/register": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Indicates where the registration action was triggered for tracking/segmentation purposes"
|
|
},
|
|
"registration_nonce": { "type": "string", "required": true, "description": "The registration nonce" },
|
|
"redirect_uri": {
|
|
"type": "string",
|
|
"description": "URI of the admin page where the user should be redirected after connection flow"
|
|
},
|
|
"plugin_slug": {
|
|
"type": "string",
|
|
"description": "Indicates from what plugin the request is coming from"
|
|
}
|
|
},
|
|
"required": ["registration_nonce"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Indicates where the registration action was triggered for tracking/segmentation purposes"
|
|
},
|
|
"registration_nonce": { "type": "string", "required": true, "description": "The registration nonce" },
|
|
"redirect_uri": {
|
|
"type": "string",
|
|
"description": "URI of the admin page where the user should be redirected after connection flow"
|
|
},
|
|
"plugin_slug": {
|
|
"type": "string",
|
|
"description": "Indicates from what plugin the request is coming from"
|
|
}
|
|
},
|
|
"required": ["registration_nonce"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Indicates where the registration action was triggered for tracking/segmentation purposes"
|
|
},
|
|
"registration_nonce": { "type": "string", "required": true, "description": "The registration nonce" },
|
|
"redirect_uri": {
|
|
"type": "string",
|
|
"description": "URI of the admin page where the user should be redirected after connection flow"
|
|
},
|
|
"plugin_slug": {
|
|
"type": "string",
|
|
"description": "Indicates from what plugin the request is coming from"
|
|
}
|
|
},
|
|
"required": ["registration_nonce"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jetpack/v4/connection/authorize_url": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "redirect_uri",
|
|
"in": "query",
|
|
"description": "URI of the admin page where the user should be redirected after connection flow",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/jetpack/v4/user-token": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_token": { "type": "string", "required": true, "description": "New user token" },
|
|
"is_connection_owner": { "type": "boolean", "description": "Is connection owner" }
|
|
},
|
|
"required": ["user_token"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_token": { "type": "string", "required": true, "description": "New user token" },
|
|
"is_connection_owner": { "type": "boolean", "description": "Is connection owner" }
|
|
},
|
|
"required": ["user_token"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_token": { "type": "string", "required": true, "description": "New user token" },
|
|
"is_connection_owner": { "type": "boolean", "description": "Is connection owner" }
|
|
},
|
|
"required": ["user_token"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/jetpack/v4/connection/owner": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "owner": { "type": "integer", "required": true, "description": "New owner" } },
|
|
"required": ["owner"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "owner": { "type": "integer", "required": true, "description": "New owner" } },
|
|
"required": ["owner"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "owner": { "type": "integer", "required": true, "description": "New owner" } },
|
|
"required": ["owner"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/notice/dismiss": { "post": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wc-admin/features": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/experiments/assignment": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/marketing/recommended": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{ "name": "category", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/marketing/knowledge-base": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "category", "in": "query", "description": "", "required": false, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/marketing/overview/activate-plugin": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "plugin": { "type": "string", "required": true } },
|
|
"required": ["plugin"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "plugin": { "type": "string", "required": true } },
|
|
"required": ["plugin"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "plugin": { "type": "string", "required": true } },
|
|
"required": ["plugin"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/marketing/overview/installed-plugins": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/marketing/recommendations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/marketing_recommendation" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "",
|
|
"required": true,
|
|
"schema": { "enum": ["channels", "extensions"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/marketing/channels": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/marketing_channel" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/marketing/campaigns": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/marketing_campaign" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/marketing/campaign-types": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/marketing_campaign_type" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/options": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/options" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/options" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/options" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/options" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/payment-gateway-suggestions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/payment-gateway-suggestions" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "force_default_suggestions",
|
|
"in": "query",
|
|
"description": "Return the default payment suggestions when woocommerce_show_marketplace_suggestions and woocommerce_setting_payments_recommendations_hidden options are set to no",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/payment-gateway-suggestions/dismiss": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/payment-gateway-suggestions" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/themes": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/upload_theme" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"pluginzip": { "type": "file", "description": "A zip file of the theme to be uploaded." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/upload_theme" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"pluginzip": { "type": "file", "description": "A zip file of the theme to be uploaded." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/upload_theme" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"pluginzip": { "type": "file", "description": "A zip file of the theme to be uploaded." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/install": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/install/status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/install/status/{job_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "job_id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/plugins/active": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/installed": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/activate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/activate/status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/activate/status/{job_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "job_id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/plugins/connect-jetpack": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/request-wccom-connect": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/finish-wccom-connect": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/connect-wcpay": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/plugins/connect-square": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugins" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/free-extensions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/product-types": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/profile": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_profile" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_profile" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completed": { "type": "boolean", "description": "Whether or not the profile was completed." },
|
|
"skipped": { "type": "boolean", "description": "Whether or not the profile was skipped." },
|
|
"industry": { "type": "array", "description": "Industry." },
|
|
"product_types": { "type": "array", "description": "Types of products sold." },
|
|
"product_count": { "type": "string", "description": "Number of products to be added." },
|
|
"selling_venues": { "type": "string", "description": "Other places the store is selling products." },
|
|
"number_employees": { "type": "string", "description": "Number of employees of the store." },
|
|
"revenue": { "type": "string", "description": "Current annual revenue of the store." },
|
|
"other_platform": { "type": "string", "description": "Name of other platform used to sell." },
|
|
"other_platform_name": {
|
|
"type": "string",
|
|
"description": "Name of other platform used to sell (not listed)."
|
|
},
|
|
"business_extensions": { "type": "array", "description": "Extra business extensions to install." },
|
|
"theme": { "type": "string", "description": "Selected store theme." },
|
|
"setup_client": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store was setup for a client."
|
|
},
|
|
"wccom_connected": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the store was connected to WooCommerce.com during the extension flow."
|
|
},
|
|
"is_agree_marketing": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store agreed to receiving marketing contents from WooCommerce.com."
|
|
},
|
|
"store_email": { "type": "string", "description": "Store email address." },
|
|
"is_store_country_set": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store country is set via onboarding profiler."
|
|
},
|
|
"is_plugins_page_skipped": {
|
|
"type": "boolean",
|
|
"description": "Whether or not plugins step in core profiler was skipped."
|
|
},
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_profile" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completed": { "type": "boolean", "description": "Whether or not the profile was completed." },
|
|
"skipped": { "type": "boolean", "description": "Whether or not the profile was skipped." },
|
|
"industry": { "type": "array", "description": "Industry." },
|
|
"product_types": { "type": "array", "description": "Types of products sold." },
|
|
"product_count": { "type": "string", "description": "Number of products to be added." },
|
|
"selling_venues": { "type": "string", "description": "Other places the store is selling products." },
|
|
"number_employees": { "type": "string", "description": "Number of employees of the store." },
|
|
"revenue": { "type": "string", "description": "Current annual revenue of the store." },
|
|
"other_platform": { "type": "string", "description": "Name of other platform used to sell." },
|
|
"other_platform_name": {
|
|
"type": "string",
|
|
"description": "Name of other platform used to sell (not listed)."
|
|
},
|
|
"business_extensions": { "type": "array", "description": "Extra business extensions to install." },
|
|
"theme": { "type": "string", "description": "Selected store theme." },
|
|
"setup_client": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store was setup for a client."
|
|
},
|
|
"wccom_connected": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the store was connected to WooCommerce.com during the extension flow."
|
|
},
|
|
"is_agree_marketing": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store agreed to receiving marketing contents from WooCommerce.com."
|
|
},
|
|
"store_email": { "type": "string", "description": "Store email address." },
|
|
"is_store_country_set": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store country is set via onboarding profiler."
|
|
},
|
|
"is_plugins_page_skipped": {
|
|
"type": "boolean",
|
|
"description": "Whether or not plugins step in core profiler was skipped."
|
|
},
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_profile" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completed": { "type": "boolean", "description": "Whether or not the profile was completed." },
|
|
"skipped": { "type": "boolean", "description": "Whether or not the profile was skipped." },
|
|
"industry": { "type": "array", "description": "Industry." },
|
|
"product_types": { "type": "array", "description": "Types of products sold." },
|
|
"product_count": { "type": "string", "description": "Number of products to be added." },
|
|
"selling_venues": { "type": "string", "description": "Other places the store is selling products." },
|
|
"number_employees": { "type": "string", "description": "Number of employees of the store." },
|
|
"revenue": { "type": "string", "description": "Current annual revenue of the store." },
|
|
"other_platform": { "type": "string", "description": "Name of other platform used to sell." },
|
|
"other_platform_name": {
|
|
"type": "string",
|
|
"description": "Name of other platform used to sell (not listed)."
|
|
},
|
|
"business_extensions": { "type": "array", "description": "Extra business extensions to install." },
|
|
"theme": { "type": "string", "description": "Selected store theme." },
|
|
"setup_client": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store was setup for a client."
|
|
},
|
|
"wccom_connected": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the store was connected to WooCommerce.com during the extension flow."
|
|
},
|
|
"is_agree_marketing": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store agreed to receiving marketing contents from WooCommerce.com."
|
|
},
|
|
"store_email": { "type": "string", "description": "Store email address." },
|
|
"is_store_country_set": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this store country is set via onboarding profiler."
|
|
},
|
|
"is_plugins_page_skipped": {
|
|
"type": "boolean",
|
|
"description": "Whether or not plugins step in core profiler was skipped."
|
|
},
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/profile/experimental_get_email_prefill": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_profile" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/import_sample_products": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/create_homepage": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/create_product_from_template": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"template_name": { "type": "string", "required": true, "description": "Product template name." }
|
|
},
|
|
"required": ["template_name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "ids",
|
|
"in": "query",
|
|
"description": "Optional parameter to get only specific task lists by ID.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["setup", "extended", "secret_tasklist"], "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ids": {
|
|
"type": "array",
|
|
"description": "Optional parameter to get only specific task lists by ID."
|
|
},
|
|
"extended_tasks": {
|
|
"type": "array",
|
|
"description": "List of extended deprecated tasks from the client-side filter."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/hide": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/unhide": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/dismiss": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/undo_dismiss": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/snooze": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"duration": { "type": "string", "description": "Time period to snooze the task." },
|
|
"task_list_id": { "type": "string", "description": "Optional parameter to query specific task list." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/action": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/tasks/{id}/undo_snooze": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/themes/install": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/themes/activate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/onboarding_theme" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/themes/recommended": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "industry",
|
|
"in": "query",
|
|
"description": "Limits the results to themes relevant for this industry (optional)",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"in": "query",
|
|
"description": "Returns pricing in this currency (optional, default: USD)",
|
|
"required": false,
|
|
"schema": { "enum": ["USD", "AUD", "CAD", "EUR", "GBP"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/plugins/install-and-activate-async": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/Install Async Schema" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"plugins": { "type": "array", "required": true, "description": "A list of plugins to install" }
|
|
},
|
|
"required": ["plugins"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/plugins/install-and-activate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/Install and Activate Schema" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/plugins/scheduled-installs/{job_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/Install Async Schema" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "job_id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/plugins/jetpack-authorization-url": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "redirect_url",
|
|
"in": "query",
|
|
"description": "The URL to redirect to after authorization",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "from",
|
|
"in": "query",
|
|
"description": "from value for the jetpack authorization page",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/onboarding/products": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/navigation/favorites/me": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "item_id": { "required": true } }, "required": ["item_id"] }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "item_id": { "required": true } }, "required": ["item_id"] }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/mobile-app/send-magic-link": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/mobile-app": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/shipping-partner-suggestions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping-partner-suggestions" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "force_default_suggestions",
|
|
"in": "query",
|
|
"description": "Return the default shipping partner suggestions when woocommerce_show_marketplace_suggestions option is set to no",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-admin/launch-your-store/initialize-coming-soon": {
|
|
"post": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/wc-admin/launch-your-store/update-survey-status": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "status": { "type": "string" } } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-admin/launch-your-store/survey-completed": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wc-admin/launch-your-store/woopayments/test-orders/count": {
|
|
"get": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/wc-admin/launch-your-store/woopayments/test-orders": {
|
|
"delete": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/wc-analytics": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/customers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_customers" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"username",
|
|
"name",
|
|
"country",
|
|
"city",
|
|
"state",
|
|
"postcode",
|
|
"date_registered",
|
|
"date_last_active",
|
|
"orders_count",
|
|
"total_spend",
|
|
"avg_order_value"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "registered_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "registered_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a customer field containing the search term. Searches the field provided by 'searchby'.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "searchby",
|
|
"in": "query",
|
|
"description": "Limit results with `search` and `searchby` to specific fields containing the search term.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "username", "email", "all"] }
|
|
},
|
|
{
|
|
"name": "name_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "name_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects including emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "last_active_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "registered_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "orders_count_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count greater than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count less than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count between two given integers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "total_spend_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend less than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "avg_order_value_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend less than or equal to a given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "last_order_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_order_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "users",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "filter_empty",
|
|
"in": "query",
|
|
"description": "Filter out results where any of the passed fields are empty",
|
|
"required": false,
|
|
"schema": {
|
|
"items": { "type": "string", "enum": ["email", "name", "country", "city", "state", "postcode"] }
|
|
}
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/customers/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_customers" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"username",
|
|
"name",
|
|
"country",
|
|
"city",
|
|
"state",
|
|
"postcode",
|
|
"date_registered",
|
|
"date_last_active",
|
|
"orders_count",
|
|
"total_spend",
|
|
"avg_order_value"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "registered_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "registered_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a customer field containing the search term. Searches the field provided by 'searchby'.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "searchby",
|
|
"in": "query",
|
|
"description": "Limit results with `search` and `searchby` to specific fields containing the search term.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "username", "email", "all"] }
|
|
},
|
|
{
|
|
"name": "name_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "name_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects including emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "last_active_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "registered_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "orders_count_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count greater than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count less than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count between two given integers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "total_spend_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend less than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "avg_order_value_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend less than or equal to a given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "last_order_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_order_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "users",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "filter_empty",
|
|
"in": "query",
|
|
"description": "Filter out results where any of the passed fields are empty",
|
|
"required": false,
|
|
"schema": {
|
|
"items": { "type": "string", "enum": ["email", "name", "country", "city", "state", "postcode"] }
|
|
}
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/leaderboards": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/leaderboard" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 20 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "persisted_query",
|
|
"in": "query",
|
|
"description": "URL query to persist across links.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/leaderboards/allowed": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/leaderboard" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/leaderboards/{leaderboard}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/leaderboard" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "leaderboard",
|
|
"in": "path",
|
|
"description": "",
|
|
"required": true,
|
|
"schema": { "enum": ["customers", "coupons", "categories", "products"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 20 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "persisted_query",
|
|
"in": "query",
|
|
"description": "URL query to persist across links.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/import": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"days": { "type": "integer", "description": "Number of days to import." },
|
|
"skip_existing": { "type": "boolean", "description": "Skip importing existing order data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"days": { "type": "integer", "description": "Number of days to import." },
|
|
"skip_existing": { "type": "boolean", "description": "Skip importing existing order data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"days": { "type": "integer", "description": "Number of days to import." },
|
|
"skip_existing": { "type": "boolean", "description": "Skip importing existing order data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/reports/import/cancel": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/reports/import/delete": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/reports/import/status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/reports/import/totals": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_import" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "days",
|
|
"in": "query",
|
|
"description": "Number of days to import.",
|
|
"required": false,
|
|
"schema": { "minimum": 0 }
|
|
},
|
|
{
|
|
"name": "skip_existing",
|
|
"in": "query",
|
|
"description": "Skip importing existing order data.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/{type}/export": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_export" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "type", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"report_args": { "type": "object", "description": "Parameters to pass on to the exported report." },
|
|
"email": {
|
|
"type": "boolean",
|
|
"description": "When true, email a link to download the export to the requesting user."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_export" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "type", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"report_args": { "type": "object", "description": "Parameters to pass on to the exported report." },
|
|
"email": {
|
|
"type": "boolean",
|
|
"description": "When true, email a link to download the export to the requesting user."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_export" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "type", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"report_args": { "type": "object", "description": "Parameters to pass on to the exported report." },
|
|
"email": {
|
|
"type": "boolean",
|
|
"description": "When true, email a link to download the export to the requesting user."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/reports/{type}/export/{export_id}/status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_export_status" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "type", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "export_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_products" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["date", "net_revenue", "orders_count", "items_sold", "product_name", "variations", "sku"]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result to items from the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "products",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified product IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "extended_info",
|
|
"in": "query",
|
|
"description": "Add additional piece of info about each product to the report.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/variations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_varitations" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "net_revenue", "orders_count", "items_sold", "sku"] }
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified parent product(s).",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified parent product(s).",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variations",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified variation IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "extended_info",
|
|
"in": "query",
|
|
"description": "Add additional piece of info about each variation to the report.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_is",
|
|
"in": "query",
|
|
"description": "Limit result set to variations that include the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "attribute_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to variations that don't include the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "category_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to variations in the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "category_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to variations not in the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "products",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified product IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/products/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_products_stats" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"net_revenue",
|
|
"coupons",
|
|
"refunds",
|
|
"shipping",
|
|
"taxes",
|
|
"net_revenue",
|
|
"orders_count",
|
|
"items_sold"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result to items from the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "products",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified product IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variations",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified variation IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["product", "category", "variation"] }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/variations/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_variations_stats" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"net_revenue",
|
|
"coupons",
|
|
"refunds",
|
|
"shipping",
|
|
"taxes",
|
|
"net_revenue",
|
|
"orders_count",
|
|
"items_sold"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "category_includes",
|
|
"in": "query",
|
|
"description": "Limit result to items from the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "category_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to variations not in the specified categories.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified parent product(s).",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified parent product(s).",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variations",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified variation IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["product", "category", "variation"] }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "attribute_is",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "attribute_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that don't include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/revenue/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_revenue_stats" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"total_sales",
|
|
"coupons",
|
|
"refunds",
|
|
"shipping",
|
|
"taxes",
|
|
"net_revenue",
|
|
"orders_count",
|
|
"items_sold",
|
|
"gross_sales"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["product", "category", "variation", "coupon", "customer_type"] }
|
|
},
|
|
{
|
|
"name": "date_type",
|
|
"in": "query",
|
|
"description": "Override the \"woocommerce_date_type\" option that is used for the database date field considered for revenue reports.",
|
|
"required": false,
|
|
"schema": { "enum": ["date_paid", "date_created", "date_completed"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/orders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_orders" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "num_items_sold", "net_total"] }
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variation_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified variation(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variation_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified variation(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "coupon_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified coupon(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "coupon_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified coupon(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tax_rate_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified tax rate(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tax_rate_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified tax rate(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status_is",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "status_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "customer_type",
|
|
"in": "query",
|
|
"description": "Limit result set to returning or new customers.",
|
|
"required": false,
|
|
"schema": { "enum": ["", "returning", "new"] }
|
|
},
|
|
{
|
|
"name": "refunds",
|
|
"in": "query",
|
|
"description": "Limit result set to specific types of refunds.",
|
|
"required": false,
|
|
"schema": { "enum": ["", "all", "partial", "full", "none"] }
|
|
},
|
|
{
|
|
"name": "extended_info",
|
|
"in": "query",
|
|
"description": "Add additional piece of info about each coupon to the report.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "attribute_is",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "attribute_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that don't include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/orders/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_orders_stats" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "net_revenue", "orders_count", "avg_order_value"] }
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "status_is",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "status_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variation_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified variation(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "variation_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified variation(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "coupon_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified coupon(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "coupon_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified coupon(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tax_rate_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified tax rate(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tax_rate_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified tax rate(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Alias for customer_type (deprecated).",
|
|
"required": false,
|
|
"schema": { "enum": ["new", "returning"] }
|
|
},
|
|
{
|
|
"name": "customer_type",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that have the specified customer_type",
|
|
"required": false,
|
|
"schema": { "enum": ["new", "returning"] }
|
|
},
|
|
{
|
|
"name": "refunds",
|
|
"in": "query",
|
|
"description": "Limit result set to specific types of refunds.",
|
|
"required": false,
|
|
"schema": { "enum": ["", "all", "partial", "full", "none"] }
|
|
},
|
|
{
|
|
"name": "attribute_is",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "attribute_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to orders that don't include products with the specified attributes.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "array" } }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["product", "category", "variation", "coupon", "customer_type"] }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_categories" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["category_id", "items_sold", "net_revenue", "orders_count", "products_count", "category"]
|
|
}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "status_is",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "status_is_not",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result set to all items that have the specified term assigned in the categories taxonomy.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "extended_info",
|
|
"in": "query",
|
|
"description": "Add additional piece of info about each category to the report.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/taxes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_taxes" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"name",
|
|
"tax_rate_id",
|
|
"tax_code",
|
|
"rate",
|
|
"order_tax",
|
|
"total_tax",
|
|
"shipping_tax",
|
|
"orders_count"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "taxes",
|
|
"in": "query",
|
|
"description": "Limit result set to items assigned one or more tax rates.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/taxes/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_taxes_stats" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "items_sold", "total_sales", "orders_count", "products_count"] }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "taxes",
|
|
"in": "query",
|
|
"description": "Limit result set to all items that have the specified term assigned in the taxes taxonomy.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["tax_rate_id"] }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_coupons" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["coupon_id", "code", "amount", "orders_count"] }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "coupons",
|
|
"in": "query",
|
|
"description": "Limit result set to coupons assigned specific coupon IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "extended_info",
|
|
"in": "query",
|
|
"description": "Add additional piece of info about each coupon to the report.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/coupons/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_coupons_stats" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "amount", "coupons_count", "orders_count"] }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "coupons",
|
|
"in": "query",
|
|
"description": "Limit result set to coupons assigned specific coupon IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "segmentby",
|
|
"in": "query",
|
|
"description": "Segment the response by additional constraint.",
|
|
"required": false,
|
|
"schema": { "enum": ["product", "variation", "category", "coupon"] }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/stock": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_stock" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["stock_status", "stock_quantity", "date", "id", "include", "title", "sku"] }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to items assigned a stock report type.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "lowstock", "instock", "outofstock", "onbackorder"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/stock/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_customers_stats" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/downloads": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_downloads" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "product"] }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "customer_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that have the specified user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "customer_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that don't have the specified user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "ip_address_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that have a specified IP address.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "ip_address_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that don't have a specified IP address.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/downloads/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_orders_stats" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "download_count"] }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"in": "query",
|
|
"description": "Time interval to use for buckets in the returned data.",
|
|
"required": false,
|
|
"schema": { "enum": ["hour", "day", "week", "month", "quarter", "year"] }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "product_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "product_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified product(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order_includes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order_excludes",
|
|
"in": "query",
|
|
"description": "Limit result set to items that don't have the specified order IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "customer_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that have the specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "customer_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that don't have the specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "ip_address_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that have a specified IP address.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "ip_address_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects that don't have a specified IP address.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/customers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report_customers" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"username",
|
|
"name",
|
|
"country",
|
|
"city",
|
|
"state",
|
|
"postcode",
|
|
"date_registered",
|
|
"date_last_active",
|
|
"orders_count",
|
|
"total_spend",
|
|
"avg_order_value"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "registered_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "registered_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a customer field containing the search term. Searches the field provided by 'searchby'.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "searchby",
|
|
"in": "query",
|
|
"description": "Limit results with `search` and `searchby` to specific fields containing the search term.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "username", "email", "all"] }
|
|
},
|
|
{
|
|
"name": "name_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "name_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects including emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "last_active_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "registered_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "orders_count_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count greater than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count less than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count between two given integers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "total_spend_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend less than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "avg_order_value_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend less than or equal to a given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "last_order_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_order_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "customers",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "users",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "filter_empty",
|
|
"in": "query",
|
|
"description": "Filter out results where any of the passed fields are empty",
|
|
"required": false,
|
|
"schema": {
|
|
"items": { "type": "string", "enum": ["email", "name", "country", "city", "state", "postcode"] }
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/customers/stats": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_customers_stats" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "registered_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "registered_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects registered after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "match",
|
|
"in": "query",
|
|
"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",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "any"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a customer field containing the search term. Searches the field provided by 'searchby'.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "searchby",
|
|
"in": "query",
|
|
"description": "Limit results with `search` and `searchby` to specific fields containing the search term.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "username", "email", "all"] }
|
|
},
|
|
{
|
|
"name": "name_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "name_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific names.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "username_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific usernames.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects including emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "email_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding emails.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_includes",
|
|
"in": "query",
|
|
"description": "Limit response to objects with specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "country_excludes",
|
|
"in": "query",
|
|
"description": "Limit response to objects excluding specific countries.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "last_active_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_active_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "registered_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects last active between two given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "orders_count_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count greater than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count less than or equal to given integer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "orders_count_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an order count between two given integers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "total_spend_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend less than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "total_spend_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with a total order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "avg_order_value_min",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend greater than or equal to given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_max",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend less than or equal to a given number.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "avg_order_value_between",
|
|
"in": "query",
|
|
"description": "Limit response to objects with an average order spend between two given numbers.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "last_order_before",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "last_order_after",
|
|
"in": "query",
|
|
"description": "Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "customers",
|
|
"in": "query",
|
|
"description": "Limit result to items with specified customer IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit stats fields to the specified items.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "force_cache_refresh",
|
|
"in": "query",
|
|
"description": "Force retrieval of fresh data instead of from the cache.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/performance-indicators": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_performance_indicator" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "stats",
|
|
"in": "query",
|
|
"description": "Limit response to specific report stats. Allowed values: revenue/total_sales, revenue/net_revenue, revenue/shipping, revenue/refunds, revenue/gross_sales, orders/orders_count, orders/avg_order_value, products/items_sold, variations/items_sold, coupons/amount, coupons/orders_count, taxes/total_tax, taxes/order_tax, taxes/shipping_tax, downloads/download_count.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"revenue/total_sales",
|
|
"revenue/net_revenue",
|
|
"revenue/shipping",
|
|
"revenue/refunds",
|
|
"revenue/gross_sales",
|
|
"orders/orders_count",
|
|
"orders/avg_order_value",
|
|
"products/items_sold",
|
|
"variations/items_sold",
|
|
"coupons/amount",
|
|
"coupons/orders_count",
|
|
"taxes/total_tax",
|
|
"taxes/order_tax",
|
|
"taxes/shipping_tax",
|
|
"downloads/download_count"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/reports/performance-indicators/allowed": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/report_performance_indicator" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "stats",
|
|
"in": "query",
|
|
"description": "Limit response to specific report stats. Allowed values: revenue/total_sales, revenue/net_revenue, revenue/shipping, revenue/refunds, revenue/gross_sales, orders/orders_count, orders/avg_order_value, products/items_sold, variations/items_sold, coupons/amount, coupons/orders_count, taxes/total_tax, taxes/order_tax, taxes/shipping_tax, downloads/download_count.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"revenue/total_sales",
|
|
"revenue/net_revenue",
|
|
"revenue/shipping",
|
|
"revenue/refunds",
|
|
"revenue/gross_sales",
|
|
"orders/orders_count",
|
|
"orders/avg_order_value",
|
|
"products/items_sold",
|
|
"variations/items_sold",
|
|
"coupons/amount",
|
|
"coupons/orders_count",
|
|
"taxes/total_tax",
|
|
"taxes/order_tax",
|
|
"taxes/shipping_tax",
|
|
"downloads/download_count"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["note_id", "date", "type", "title", "status"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Type of note.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": ["error", "warning", "update", "info", "marketing", "survey", "email"],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Status of note.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": { "enum": ["pending", "actioned", "unactioned", "snoozed", "sent"], "type": "string" }
|
|
}
|
|
},
|
|
{
|
|
"name": "source",
|
|
"in": "query",
|
|
"description": "Source of note.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/delete/{id}": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/delete/all": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "status": { "type": "array", "description": "Status of note." } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/tracker/{note_id}/user/{user_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "note_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/update": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/experimental-activate-promo/{promo_note_name}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "promo_note_name", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "promo_note_name", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "promo_note_name", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wc-analytics/admin/notes/{note_id}/action/{action_id}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "note_id", "in": "path", "description": "Unique ID for the Note.", "required": true, "schema": {} },
|
|
{
|
|
"name": "action_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the Note Action.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "note_id", "in": "path", "description": "Unique ID for the Note.", "required": true, "schema": {} },
|
|
{
|
|
"name": "action_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the Note Action.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "note_id", "in": "path", "description": "Unique ID for the Note.", "required": true, "schema": {} },
|
|
{
|
|
"name": "action_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the Note Action.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to coupons with codes matching a given string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific code.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "required": true, "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/coupons/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/coupons/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/data": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_index" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/data/countries/locales": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_countries" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/data/countries": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_countries" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/data/countries/{location}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_countries" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "location",
|
|
"in": "path",
|
|
"description": "ISO3166 alpha-2 country code.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/data/download-ips": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/data_download_ips" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/orders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to orders which have specific statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific customer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "number",
|
|
"in": "query",
|
|
"description": "Limit result set to orders matching part of an order number.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/orders/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/orders/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"manual_update": {
|
|
"type": "boolean",
|
|
"description": "Set the action as manual so that the order note registers as \"added by user\"."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Search by similar product name or SKU.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"modified",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"price",
|
|
"popularity",
|
|
"rating"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": { "enum": ["instock", "outofstock", "onbackorder"] }
|
|
},
|
|
{
|
|
"name": "search_sku",
|
|
"in": "query",
|
|
"description": "Limit results to those with a SKU that partially matches a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "low_in_stock",
|
|
"in": "query",
|
|
"description": "Limit result set to products that are low or out of stock. (Deprecated)",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/suggested-products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"modified",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "in_stock",
|
|
"in": "query",
|
|
"description": "Limit result set to products in stock or out of stock.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result set to specific product categorie ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"in": "query",
|
|
"description": "Limit result set to specific product tag ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "Limit result set to specific amount of suggested products.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/products/{id}/duplicate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the product was created, as GMT."
|
|
},
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the product."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"post_password": { "type": "string", "description": "Post password." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Search by similar attribute name.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Slug identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{attribute_id}/terms/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{attribute_id}/terms/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/attributes/{slug}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/categories/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/{product_id}/variations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Search by similar product name, SKU, or attribute value.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified", "menu_order"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": { "enum": ["instock", "outofstock", "onbackorder"] }
|
|
},
|
|
{
|
|
"name": "has_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products with or without price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": { "type": "string", "description": "Attribute slug." },
|
|
"term": { "type": "string", "description": "Attribute term." },
|
|
"terms": { "type": "array", "description": "Attribute terms." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/{product_id}/variations/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/{product_id}/variations/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/{product_id}/variations/generate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delete": { "type": "boolean", "description": "Deletes unused variations." },
|
|
"default_values": { "type": "object", "description": "Default values for generated variations." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Stock Keeping Unit." },
|
|
"global_unique_id": { "type": "string", "description": "GTIN, UPC, EAN or ISBN." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"status": { "type": "string", "description": "Variation status." },
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at variation level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"stock_status": { "type": "string", "description": "Controls the stock status of the product." },
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"low_stock_amount": {
|
|
"type": ["integer", "null"],
|
|
"description": "Low Stock amount for the variation."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"name": { "type": "string", "description": "Product parent name." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/variations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Search by similar product name, SKU, or attribute value.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified", "menu_order"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": { "enum": ["instock", "outofstock", "onbackorder"] }
|
|
},
|
|
{
|
|
"name": "has_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products with or without price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": { "type": "string", "description": "Attribute slug." },
|
|
"term": { "type": "string", "description": "Attribute term." },
|
|
"terms": { "type": "array", "description": "Attribute terms." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/products/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to reviews published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "id", "include", "product"] }
|
|
},
|
|
{
|
|
"name": "reviewer",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned to specific user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "reviewer_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes reviews assigned to specific user IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "reviewer_email",
|
|
"in": "query",
|
|
"description": "Limit result set to that from a specific author email.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned to specific product IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "hold", "approved", "spam", "trash"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"required": true,
|
|
"description": "Unique identifier for the product."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "required": true, "description": "Name of the reviewer." },
|
|
"reviewer_email": { "type": "string", "required": true, "description": "Email of the reviewer." },
|
|
"review": { "type": "string", "required": true, "description": "Review content." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
},
|
|
"required": ["product_id", "reviewer", "reviewer_email", "review"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/reviews/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/reviews/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "Unique identifier for the product that the review belongs to."
|
|
},
|
|
"product_name": { "type": "string", "description": "Product name." },
|
|
"status": { "type": "string", "description": "Status of the review." },
|
|
"reviewer": { "type": "string", "description": "Reviewer name." },
|
|
"reviewer_email": { "type": "string", "description": "Reviewer email." },
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/products/low-in-stock": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["draft", "pending", "private", "publish", "future"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/products/count-low-in-stock": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/Count Low in Stock Items" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["draft", "pending", "private", "publish", "future"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/settings/{group_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-analytics/settings/{group_id}/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/settings/{group_id}/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/taxes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "order", "priority"] }
|
|
},
|
|
{
|
|
"name": "class",
|
|
"in": "query",
|
|
"description": "Sort by tax class.",
|
|
"required": false,
|
|
"schema": { "enum": ["standard", "reduced-rate", "zero-rate"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Search by similar tax code.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to items that have the specified rate ID(s) assigned.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/taxes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-analytics/taxes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": {
|
|
"type": "string",
|
|
"description": "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead."
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"description": "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead."
|
|
},
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." },
|
|
"postcodes": {
|
|
"type": "array",
|
|
"description": "List of postcodes / ZIPs. Introduced in WooCommerce 5.3."
|
|
},
|
|
"cities": { "type": "array", "description": "List of city names. Introduced in WooCommerce 5.3." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/batch": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "validation": { "type": "string" }, "requests": { "type": "array", "required": true } },
|
|
"required": ["requests"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/cart/add-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "integer", "description": "The basket item product or variation ID." },
|
|
"quantity": { "type": "integer", "description": "Quantity of this item to add to the basket." },
|
|
"variation": { "type": "array", "description": "Chosen attributes (for variations)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/apply-coupon": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Unique identifier for the coupon within the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "The coupon's unique code." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "The discount type for the coupon (eg percentage or fixed amount)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/coupons/{code}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"description": "Unique identifier for the coupon within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"description": "Unique identifier for the coupon within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/cart/extensions": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart-extensions" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Extension's name - this will be used to ensure the data in the request is routed appropriately."
|
|
},
|
|
"data": { "type": "object", "description": "Additional data to pass to the extension" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/items": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/items/{key}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/cart/remove-coupon": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Unique identifier for the coupon within the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/remove-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string", "description": "Unique identifier (key) for the basket item." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/select-shipping-rate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package_id": {
|
|
"type": ["integer", "string", "null"],
|
|
"required": false,
|
|
"description": "The ID of the package being shipped. Leave blank to apply to all packages."
|
|
},
|
|
"rate_id": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "The chosen rate ID for the package."
|
|
}
|
|
},
|
|
"required": ["rate_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/update-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string", "description": "Unique identifier (key) for the basket item to update." },
|
|
"quantity": { "type": "integer", "description": "New quantity of the item in the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/cart/update-customer": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_address": { "type": "object", "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/checkout": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"payment_data": {
|
|
"type": "array",
|
|
"description": "Data to pass through to the payment method when processing payment."
|
|
},
|
|
"customer_password": {
|
|
"type": "string",
|
|
"description": "Customer password for new accounts, if applicable."
|
|
},
|
|
"customer_note": {
|
|
"type": "string",
|
|
"description": "Note added to the order by the customer during checkout."
|
|
},
|
|
"billing_address": { "type": "object", "required": true, "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": {
|
|
"type": "string",
|
|
"description": "The ID of the payment method being used to process the payment."
|
|
},
|
|
"create_account": {
|
|
"type": "boolean",
|
|
"description": "Whether to create a new user account as part of order processing."
|
|
},
|
|
"additional_fields": {
|
|
"type": "object",
|
|
"description": "Additional fields to be persisted on the order."
|
|
},
|
|
"extensions": { "type": "object" }
|
|
},
|
|
"required": ["billing_address"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/checkout/{id}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout-order" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"payment_data": {
|
|
"type": "array",
|
|
"description": "Data to pass through to the payment method when processing payment."
|
|
},
|
|
"customer_note": {
|
|
"type": "string",
|
|
"description": "Note added to the order by the customer during checkout."
|
|
},
|
|
"billing_address": { "type": "object", "required": true, "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": {
|
|
"type": "string",
|
|
"description": "The ID of the payment method being used to process the payment."
|
|
},
|
|
"additional_fields": {
|
|
"type": "object",
|
|
"description": "Additional fields to be persisted on the order."
|
|
},
|
|
"extensions": { "type": "object" }
|
|
},
|
|
"required": ["billing_address"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/order/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/term" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count", "menu_order", "name_num", "id"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/collection-data": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product-collection-data" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific slug(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources created after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources created before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "date_column",
|
|
"in": "query",
|
|
"description": "When limiting response using after/before, which date column to compare against.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "modified", "modified_gmt"] }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"modified",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"price",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"comment_count"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable", "variation"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product category terms.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product tags.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["instock", "outofstock", "onbackorder"],
|
|
"sanitize_callback": "sanitize_text_field",
|
|
"validate_callback": "rest_validate_request_arg"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with selected global attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Attribute taxonomy name.",
|
|
"type": "string",
|
|
"sanitize_callback": "wc_sanitize_taxonomy_name"
|
|
},
|
|
"term_id": {
|
|
"description": "List of attribute term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"sanitize_callback": "wp_parse_id_list"
|
|
},
|
|
"slug": {
|
|
"description": "List of attribute slug(s). If a term ID is provided, this will be ignored.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"sanitize_callback": "wp_parse_slug_list"
|
|
},
|
|
"operator": {
|
|
"description": "Operator to compare product attribute terms.",
|
|
"type": "string",
|
|
"enum": ["in", "not_in", "and"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attribute_relation",
|
|
"in": "query",
|
|
"description": "The logical relationship between attributes when filtering across several at once.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "and"] }
|
|
},
|
|
{
|
|
"name": "catalog_visibility",
|
|
"in": "query",
|
|
"description": "Determines if hidden or visible catalogue products are shown.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "visible", "catalog", "search", "hidden"] }
|
|
},
|
|
{
|
|
"name": "rating",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a certain average rating.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer", "enum": [1, 2, 3, 4, 5] } }
|
|
},
|
|
{
|
|
"name": "calculate_price_range",
|
|
"in": "query",
|
|
"description": "If true, calculates the minimum and maximum product prices for the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "calculate_stock_status_counts",
|
|
"in": "query",
|
|
"description": "If true, calculates stock counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "calculate_attribute_counts",
|
|
"in": "query",
|
|
"description": "If requested, calculates attribute term counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"taxonomy": {
|
|
"description": "Taxonomy name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"query_type": {
|
|
"description": "Filter condition\t being performed which may affect counts. Valid values include \"and\" and \"or\".",
|
|
"type": "string",
|
|
"enum": ["and", "or"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calculate_rating_counts",
|
|
"in": "query",
|
|
"description": "If true, calculates rating counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "id", "rating", "product"] }
|
|
},
|
|
{
|
|
"name": "category_id",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews from specific category IDs.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product_id",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews from specific product IDs.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/term" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific slug(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources created after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources created before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "date_column",
|
|
"in": "query",
|
|
"description": "When limiting response using after/before, which date column to compare against.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "modified", "modified_gmt"] }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"modified",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"price",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"comment_count"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable", "variation"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product category terms.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product tags.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["instock", "outofstock", "onbackorder"],
|
|
"sanitize_callback": "sanitize_text_field",
|
|
"validate_callback": "rest_validate_request_arg"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with selected global attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Attribute taxonomy name.",
|
|
"type": "string",
|
|
"sanitize_callback": "wc_sanitize_taxonomy_name"
|
|
},
|
|
"term_id": {
|
|
"description": "List of attribute term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"sanitize_callback": "wp_parse_id_list"
|
|
},
|
|
"slug": {
|
|
"description": "List of attribute slug(s). If a term ID is provided, this will be ignored.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"sanitize_callback": "wp_parse_slug_list"
|
|
},
|
|
"operator": {
|
|
"description": "Operator to compare product attribute terms.",
|
|
"type": "string",
|
|
"enum": ["in", "not_in", "and"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attribute_relation",
|
|
"in": "query",
|
|
"description": "The logical relationship between attributes when filtering across several at once.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "and"] }
|
|
},
|
|
{
|
|
"name": "catalog_visibility",
|
|
"in": "query",
|
|
"description": "Determines if hidden or visible catalogue products are shown.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "visible", "catalog", "search", "hidden"] }
|
|
},
|
|
{
|
|
"name": "rating",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a certain average rating.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer", "enum": [1, 2, 3, 4, 5] } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/products/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "slug", "in": "path", "description": "Slug of the resource.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/batch": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "validation": { "type": "string" }, "requests": { "type": "array", "required": true } },
|
|
"required": ["requests"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/add-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "integer", "description": "The basket item product or variation ID." },
|
|
"quantity": { "type": "integer", "description": "Quantity of this item to add to the basket." },
|
|
"variation": { "type": "array", "description": "Chosen attributes (for variations)." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/apply-coupon": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Unique identifier for the coupon within the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "The coupon's unique code." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "The discount type for the coupon (eg percentage or fixed amount)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/coupons/{code}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"description": "Unique identifier for the coupon within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"description": "Unique identifier for the coupon within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/extensions": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart-extensions" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Extension's name - this will be used to ensure the data in the request is routed appropriately."
|
|
},
|
|
"data": { "type": "object", "description": "Additional data to pass to the extension" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/items": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/items/{key}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": { "type": "object", "properties": { "extensions": { "type": "object" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"description": "Unique identifier for the item within the basket.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/remove-coupon": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Unique identifier for the coupon within the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/remove-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string", "description": "Unique identifier (key) for the basket item." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/select-shipping-rate": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package_id": {
|
|
"type": ["integer", "string", "null"],
|
|
"required": false,
|
|
"description": "The ID of the package being shipped. Leave blank to apply to all packages."
|
|
},
|
|
"rate_id": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "The chosen rate ID for the package."
|
|
}
|
|
},
|
|
"required": ["rate_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/update-item": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string", "description": "Unique identifier (key) for the basket item to update." },
|
|
"quantity": { "type": "integer", "description": "New quantity of the item in the basket." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/cart/update-customer": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/cart" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_address": { "type": "object", "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/checkout": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"payment_data": {
|
|
"type": "array",
|
|
"description": "Data to pass through to the payment method when processing payment."
|
|
},
|
|
"customer_password": {
|
|
"type": "string",
|
|
"description": "Customer password for new accounts, if applicable."
|
|
},
|
|
"customer_note": {
|
|
"type": "string",
|
|
"description": "Note added to the order by the customer during checkout."
|
|
},
|
|
"billing_address": { "type": "object", "required": true, "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": {
|
|
"type": "string",
|
|
"description": "The ID of the payment method being used to process the payment."
|
|
},
|
|
"create_account": {
|
|
"type": "boolean",
|
|
"description": "Whether to create a new user account as part of order processing."
|
|
},
|
|
"additional_fields": {
|
|
"type": "object",
|
|
"description": "Additional fields to be persisted on the order."
|
|
},
|
|
"extensions": { "type": "object" }
|
|
},
|
|
"required": ["billing_address"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/checkout/{id}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/checkout-order" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"payment_data": {
|
|
"type": "array",
|
|
"description": "Data to pass through to the payment method when processing payment."
|
|
},
|
|
"customer_note": {
|
|
"type": "string",
|
|
"description": "Note added to the order by the customer during checkout."
|
|
},
|
|
"billing_address": { "type": "object", "required": true, "description": "Billing address." },
|
|
"shipping_address": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": {
|
|
"type": "string",
|
|
"description": "The ID of the payment method being used to process the payment."
|
|
},
|
|
"additional_fields": {
|
|
"type": "object",
|
|
"description": "Additional fields to be persisted on the order."
|
|
},
|
|
"extensions": { "type": "object" }
|
|
},
|
|
"required": ["billing_address"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/store/v1/order/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/term" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count", "menu_order", "name_num", "id"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/collection-data": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product-collection-data" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific slug(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources created after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources created before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "date_column",
|
|
"in": "query",
|
|
"description": "When limiting response using after/before, which date column to compare against.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "modified", "modified_gmt"] }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"modified",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"price",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"comment_count"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable", "variation"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product category terms.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product tags.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["instock", "outofstock", "onbackorder"],
|
|
"sanitize_callback": "sanitize_text_field",
|
|
"validate_callback": "rest_validate_request_arg"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with selected global attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Attribute taxonomy name.",
|
|
"type": "string",
|
|
"sanitize_callback": "wc_sanitize_taxonomy_name"
|
|
},
|
|
"term_id": {
|
|
"description": "List of attribute term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"sanitize_callback": "wp_parse_id_list"
|
|
},
|
|
"slug": {
|
|
"description": "List of attribute slug(s). If a term ID is provided, this will be ignored.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"sanitize_callback": "wp_parse_slug_list"
|
|
},
|
|
"operator": {
|
|
"description": "Operator to compare product attribute terms.",
|
|
"type": "string",
|
|
"enum": ["in", "not_in", "and"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attribute_relation",
|
|
"in": "query",
|
|
"description": "The logical relationship between attributes when filtering across several at once.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "and"] }
|
|
},
|
|
{
|
|
"name": "catalog_visibility",
|
|
"in": "query",
|
|
"description": "Determines if hidden or visible catalogue products are shown.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "visible", "catalog", "search", "hidden"] }
|
|
},
|
|
{
|
|
"name": "rating",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a certain average rating.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer", "enum": [1, 2, 3, 4, 5] } }
|
|
},
|
|
{
|
|
"name": "calculate_price_range",
|
|
"in": "query",
|
|
"description": "If true, calculates the minimum and maximum product prices for the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "calculate_stock_status_counts",
|
|
"in": "query",
|
|
"description": "If true, calculates stock counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "calculate_attribute_counts",
|
|
"in": "query",
|
|
"description": "If requested, calculates attribute term counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"taxonomy": {
|
|
"description": "Taxonomy name.",
|
|
"type": "string",
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
},
|
|
"query_type": {
|
|
"description": "Filter condition\t being performed which may affect counts. Valid values include \"and\" and \"or\".",
|
|
"type": "string",
|
|
"enum": ["and", "or"],
|
|
"context": ["view", "edit"],
|
|
"readonly": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "calculate_rating_counts",
|
|
"in": "query",
|
|
"description": "If true, calculates rating counts for products in the collection.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "id", "rating", "product"] }
|
|
},
|
|
{
|
|
"name": "category_id",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews from specific category IDs.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product_id",
|
|
"in": "query",
|
|
"description": "Limit result set to reviews from specific product IDs.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/term" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Sort ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort by term property.",
|
|
"required": false,
|
|
"schema": { "enum": ["name", "slug", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "If true, empty terms will not be returned.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set. Defaults to no limit if left blank.",
|
|
"required": false,
|
|
"schema": { "minimum": 0, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific slug(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources created after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources created before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "date_column",
|
|
"in": "query",
|
|
"description": "When limiting response using after/before, which date column to compare against.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "modified", "modified_gmt"] }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"modified",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"price",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order",
|
|
"comment_count"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable", "variation"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product category terms.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag_operator",
|
|
"in": "query",
|
|
"description": "Operator to compare product tags.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "not_in", "and"] }
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price, provided using the smallest unit of the currency.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "stock_status",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specified stock status.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["instock", "outofstock", "onbackorder"],
|
|
"sanitize_callback": "sanitize_text_field",
|
|
"validate_callback": "rest_validate_request_arg"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Limit result set to products with selected global attributes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attribute": {
|
|
"description": "Attribute taxonomy name.",
|
|
"type": "string",
|
|
"sanitize_callback": "wc_sanitize_taxonomy_name"
|
|
},
|
|
"term_id": {
|
|
"description": "List of attribute term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"sanitize_callback": "wp_parse_id_list"
|
|
},
|
|
"slug": {
|
|
"description": "List of attribute slug(s). If a term ID is provided, this will be ignored.",
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"sanitize_callback": "wp_parse_slug_list"
|
|
},
|
|
"operator": {
|
|
"description": "Operator to compare product attribute terms.",
|
|
"type": "string",
|
|
"enum": ["in", "not_in", "and"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "attribute_relation",
|
|
"in": "query",
|
|
"description": "The logical relationship between attributes when filtering across several at once.",
|
|
"required": false,
|
|
"schema": { "enum": ["in", "and"] }
|
|
},
|
|
{
|
|
"name": "catalog_visibility",
|
|
"in": "query",
|
|
"description": "Determines if hidden or visible catalogue products are shown.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "visible", "catalog", "search", "hidden"] }
|
|
},
|
|
{
|
|
"name": "rating",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a certain average rating.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer", "enum": [1, 2, 3, 4, 5] } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/store/v1/products/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "slug", "in": "path", "description": "Slug of the resource.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/private": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/private/ai/store-title": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/store-title" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"business_description": {
|
|
"type": "string",
|
|
"description": "The business description for a given store."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/images": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/images" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"business_description": {
|
|
"type": "string",
|
|
"description": "The business description for a given store."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/patterns": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/patterns" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"business_description": {
|
|
"type": "string",
|
|
"description": "The business description for a given store."
|
|
},
|
|
"images": { "type": "object", "description": "The images for a given store." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/patterns" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/product": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"products_information": {
|
|
"type": "object",
|
|
"description": "Data generated by AI for updating dummy products."
|
|
},
|
|
"last_product": {
|
|
"type": "boolean",
|
|
"description": "Whether the product being updated is the last one in the loop"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/products": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/products" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"business_description": {
|
|
"type": "string",
|
|
"description": "The business description for a given store."
|
|
},
|
|
"images": { "type": "object", "description": "The images for a given store." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/products" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/business-description": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ai/business-description" } }
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"business_description": {
|
|
"type": "string",
|
|
"description": "The business description for a given store."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/ai/store-info": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ai/store-info" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/private/patterns": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/patterns" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/patterns" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"in": "query",
|
|
"description": "Use WP Query arguments to modify the response; private query vars require appropriate authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific code.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "required": true, "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/coupons/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/coupons/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"expiry_date": { "type": ["null", "string"], "description": "UTC DateTime when the coupon expires." },
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"exclude_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/customers/{customer_id}/downloads": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer_download" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "customer_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/customers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "registered_date"] }
|
|
},
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific email.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "role",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific role.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"all",
|
|
"administrator",
|
|
"editor",
|
|
"author",
|
|
"contributor",
|
|
"subscriber",
|
|
"customer",
|
|
"shop_manager"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "required": true, "description": "New user email address." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "required": false, "description": "New user username." },
|
|
"password": { "type": "string", "required": true, "description": "New user password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
},
|
|
"required": ["email", "password"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/customers/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
},
|
|
"reassign": { "type": "integer", "description": "ID to reassign posts to." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/customers/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/{order_id}/notes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"note": { "type": "string", "required": true, "description": "Order note content." },
|
|
"customer_note": {
|
|
"type": "boolean",
|
|
"description": "Shows/define if the note is only for reference or for the customer (the user will be notified)."
|
|
}
|
|
},
|
|
"required": ["note"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/{order_id}/notes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/{order_id}/refunds": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"in": "query",
|
|
"description": "Use WP Query arguments to modify the response; private query vars require appropriate authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific status.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"any",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific customer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": { "type": "string", "description": "Refund amount." },
|
|
"reason": { "type": "string", "description": "Reason for refund." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/{order_id}/refunds/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"in": "query",
|
|
"description": "Use WP Query arguments to modify the response; private query vars require appropriate authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific status.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"any",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific customer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/orders/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
},
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes/{attribute_id}/terms/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes/{attribute_id}/terms/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/attributes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/categories/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/{product_id}/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "query",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "integer", "description": "Unique identifier for the variation." },
|
|
"review": { "type": "string", "required": true, "description": "Review content." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "required": true, "description": "Name of the reviewer." },
|
|
"email": { "type": "string", "required": true, "description": "Email of the reviewer." }
|
|
},
|
|
"required": ["review", "name", "email"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/{product_id}/reviews/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/shipping_classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/shipping_classes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/shipping_classes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/tags/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/tags/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"in": "query",
|
|
"description": "Use WP Query arguments to modify the response; private query vars require appropriate authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific SKU.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/products/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": { "type": "string", "description": "Start date of sale price." },
|
|
"date_on_sale_to": { "type": "string", "description": "End data of sale price." },
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"download_type": {
|
|
"type": "string",
|
|
"description": "Download type, this controls the schema on the front-end."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"variations": { "type": "array", "description": "List of variations." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/reports/sales": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sales_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/reports/top_sellers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/top_sellers_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/reports": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/taxes/classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "name": { "type": "string", "required": true, "description": "Tax class name." } },
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/taxes/classes/{slug}": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Unique slug for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/taxes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "order", "priority"] }
|
|
},
|
|
{
|
|
"name": "class",
|
|
"in": "query",
|
|
"description": "Sort by tax class.",
|
|
"required": false,
|
|
"schema": { "enum": ["standard", "reduced-rate", "zero-rate"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/taxes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/taxes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/webhooks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "title"] }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to webhooks assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "active", "paused", "disabled"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "required": true, "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
},
|
|
"delivery_url": { "type": "string", "required": true, "description": "Webhook delivery URL." }
|
|
},
|
|
"required": ["topic", "delivery_url"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/webhooks/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/webhooks/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v1/webhooks/{webhook_id}/deliveries": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook_delivery" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "webhook_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the webhook.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v1/webhooks/{webhook_id}/deliveries/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook_delivery" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "webhook_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the webhook.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/coupons": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific code.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "required": true, "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/coupons/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_coupon" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/coupons/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Coupon code." },
|
|
"amount": {
|
|
"type": "string",
|
|
"description": "The amount of discount. Should always be numeric, even if setting a percentage."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "The status of the coupon. Should always be draft, published, or pending review"
|
|
},
|
|
"discount_type": {
|
|
"type": "string",
|
|
"description": "Determines the type of discount that will be applied."
|
|
},
|
|
"description": { "type": "string", "description": "Coupon description." },
|
|
"date_expires": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, in the site's timezone."
|
|
},
|
|
"date_expires_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the coupon expires, as GMT."
|
|
},
|
|
"individual_use": {
|
|
"type": "boolean",
|
|
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the basket."
|
|
},
|
|
"product_ids": { "type": "array", "description": "List of product IDs the coupon can be used on." },
|
|
"excluded_product_ids": {
|
|
"type": "array",
|
|
"description": "List of product IDs the coupon cannot be used on."
|
|
},
|
|
"usage_limit": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used in total."
|
|
},
|
|
"usage_limit_per_user": {
|
|
"type": "integer",
|
|
"description": "How many times the coupon can be used per customer."
|
|
},
|
|
"limit_usage_to_x_items": {
|
|
"type": "integer",
|
|
"description": "Max number of items in the basket the coupon can be applied to."
|
|
},
|
|
"free_shipping": {
|
|
"type": "boolean",
|
|
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping."
|
|
},
|
|
"product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon applies to."
|
|
},
|
|
"excluded_product_categories": {
|
|
"type": "array",
|
|
"description": "List of category IDs the coupon does not apply to."
|
|
},
|
|
"exclude_sale_items": {
|
|
"type": "boolean",
|
|
"description": "If true, this coupon will not be applied to items that have sale prices."
|
|
},
|
|
"minimum_amount": {
|
|
"type": "string",
|
|
"description": "Minimum order amount that needs to be in the basket before coupon applies."
|
|
},
|
|
"maximum_amount": {
|
|
"type": "string",
|
|
"description": "Maximum order amount allowed when using the coupon."
|
|
},
|
|
"email_restrictions": {
|
|
"type": "array",
|
|
"description": "List of email addresses that can use this coupon."
|
|
},
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/customers/{customer_id}/downloads": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer_download" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "customer_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/customers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "registered_date"] }
|
|
},
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific email.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "role",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific role.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"all",
|
|
"administrator",
|
|
"editor",
|
|
"author",
|
|
"contributor",
|
|
"subscriber",
|
|
"customer",
|
|
"shop_manager"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "required": true, "description": "New user email address." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "required": false, "description": "New user username." },
|
|
"password": { "type": "string", "required": true, "description": "New user password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
},
|
|
"required": ["email", "password"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/customers/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/customer" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
},
|
|
"reassign": { "type": "integer", "description": "ID to reassign posts to." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/customers/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string", "description": "The email address for the customer." },
|
|
"first_name": { "type": "string", "description": "Customer first name." },
|
|
"last_name": { "type": "string", "description": "Customer last name." },
|
|
"username": { "type": "string", "description": "Customer login name." },
|
|
"password": { "type": "string", "description": "Customer password." },
|
|
"billing": { "type": "object", "description": "List of billing address data." },
|
|
"shipping": { "type": "object", "description": "List of shipping address data." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/{order_id}/notes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result to customers or internal notes.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "customer", "internal"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"note": { "type": "string", "required": true, "description": "Order note content." },
|
|
"customer_note": {
|
|
"type": "boolean",
|
|
"description": "If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only."
|
|
}
|
|
},
|
|
"required": ["note"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/{order_id}/notes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/order_note" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/{order_id}/refunds": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": { "type": "string", "description": "Refund amount." },
|
|
"reason": { "type": "string", "description": "Reason for refund." },
|
|
"refunded_by": { "type": "integer", "description": "User ID of user who created the refund." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"api_refund": {
|
|
"type": "boolean",
|
|
"description": "When true, the payment gateway API is used to generate the refund."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/{order_id}/refunds/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order_refund" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "order_id", "in": "path", "description": "The order ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific status.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"any",
|
|
"trash",
|
|
"auto-draft",
|
|
"pending",
|
|
"processing",
|
|
"on-hold",
|
|
"completed",
|
|
"cancelled",
|
|
"refunded",
|
|
"failed",
|
|
"checkout-draft"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "customer",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific customer.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to orders assigned a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "dp",
|
|
"in": "query",
|
|
"description": "Number of decimal points to use in each resource.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order_item_display_meta",
|
|
"in": "query",
|
|
"description": "Only show meta which is meant to be displayed for an order.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shop_order" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/orders/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent_id": { "type": "integer", "description": "Parent order ID." },
|
|
"status": { "type": "string", "description": "Order status." },
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency the order was created with, in ISO format."
|
|
},
|
|
"customer_id": { "type": "integer", "description": "User ID who owns the order. 0 for guests." },
|
|
"customer_note": { "type": "string", "description": "Note left by customer during checkout." },
|
|
"billing": { "type": "object", "description": "Billing address." },
|
|
"shipping": { "type": "object", "description": "Shipping address." },
|
|
"payment_method": { "type": "string", "description": "Payment method ID." },
|
|
"payment_method_title": { "type": "string", "description": "Payment method title." },
|
|
"transaction_id": { "type": "string", "description": "Unique transaction ID." },
|
|
"meta_data": { "type": "array", "description": "Meta data." },
|
|
"line_items": { "type": "array", "description": "Line items data." },
|
|
"shipping_lines": { "type": "array", "description": "Shipping lines data." },
|
|
"fee_lines": { "type": "array", "description": "Fee lines data." },
|
|
"coupon_lines": { "type": "array", "description": "Coupons line data." },
|
|
"set_paid": {
|
|
"type": "boolean",
|
|
"description": "Define if the order is paid. It will set the status to processing and reduce stock items."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes/{attribute_id}/terms": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes/{attribute_id}/terms/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_attribute_term" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes/{attribute_id}/terms/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "attribute_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attribute of the terms.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Term name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_attribute" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/attributes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Attribute name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"type": { "type": "string", "description": "Type of attribute." },
|
|
"order_by": { "type": "string", "description": "Default sort order." },
|
|
"has_archives": { "type": "boolean", "description": "Enable/Disable attribute archives." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/categories/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Category name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the resource." },
|
|
"description": { "type": "string", "description": "HTML description of the resource." },
|
|
"display": { "type": "string", "description": "Category archive display type." },
|
|
"image": { "type": "object", "description": "Image data." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/reviews": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "query",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "integer", "description": "Unique identifier for the variation." },
|
|
"review": { "type": "string", "required": true, "description": "Review content." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "required": true, "description": "Name of the reviewer." },
|
|
"email": { "type": "string", "required": true, "description": "Email of the reviewer." }
|
|
},
|
|
"required": ["review", "name", "email"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/reviews/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_review" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/reviews/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"review": { "type": "string", "description": "The content of the review." },
|
|
"date_created": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, in the site's timezone."
|
|
},
|
|
"date_created_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "The date the review was created, as GMT."
|
|
},
|
|
"rating": { "type": "integer", "description": "Review rating (0 to 5)." },
|
|
"name": { "type": "string", "description": "Reviewer name." },
|
|
"email": { "type": "string", "description": "Reviewer email." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/shipping_classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/shipping_classes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/product_shipping_class" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/shipping_classes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping class name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by resource attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "slug", "term_group", "description", "count"] }
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide resources not assigned to any products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "product",
|
|
"in": "query",
|
|
"description": "Limit result set to resources assigned to a specific product.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to resources with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Name for the resource." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/tags/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/tags/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tag name." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the resource unique to its type."
|
|
},
|
|
"description": { "type": "string", "description": "HTML description of the resource." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"title",
|
|
"slug",
|
|
"modified",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating",
|
|
"menu_order"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "in_stock",
|
|
"in": "query",
|
|
"description": "Limit result set to products in stock or out of stock.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Product name." },
|
|
"slug": { "type": "string", "description": "Product slug." },
|
|
"type": { "type": "string", "description": "Product type." },
|
|
"status": { "type": "string", "description": "Product status (post status)." },
|
|
"featured": { "type": "boolean", "description": "Featured product." },
|
|
"catalog_visibility": { "type": "string", "description": "Catalogue visibility." },
|
|
"description": { "type": "string", "description": "Product description." },
|
|
"short_description": { "type": "string", "description": "Product short description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Product regular price." },
|
|
"sale_price": { "type": "string", "description": "Product sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the product is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the product is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"external_url": {
|
|
"type": "string",
|
|
"description": "Product external URL. Only for external products."
|
|
},
|
|
"button_text": {
|
|
"type": "string",
|
|
"description": "Product external button text. Only for external products."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": { "type": "boolean", "description": "Stock management at product level." },
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"sold_individually": {
|
|
"type": "boolean",
|
|
"description": "Allow one item to be bought in a single order."
|
|
},
|
|
"weight": { "type": "string", "description": "Product weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Product dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"reviews_allowed": { "type": "boolean", "description": "Allow reviews." },
|
|
"upsell_ids": { "type": "array", "description": "List of up-sell products IDs." },
|
|
"cross_sell_ids": { "type": "array", "description": "List of cross-sell products IDs." },
|
|
"parent_id": { "type": "integer", "description": "Product parent ID." },
|
|
"purchase_note": {
|
|
"type": "string",
|
|
"description": "Optional note to send the customer after purchase."
|
|
},
|
|
"categories": { "type": "array", "description": "List of categories." },
|
|
"tags": { "type": "array", "description": "List of tags." },
|
|
"images": { "type": "array", "description": "List of images." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"default_attributes": { "type": "array", "description": "Defaults variation attributes." },
|
|
"grouped_products": { "type": "array", "description": "List of grouped products ID." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/variations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to resources modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "dates_are_gmt",
|
|
"in": "query",
|
|
"description": "Whether to consider GMT post dates when limiting response by published or modified date.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "title", "slug", "modified", "menu_order"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to those of particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["any", "future", "trash", "draft", "pending", "private", "publish"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific type.",
|
|
"required": false,
|
|
"schema": { "enum": ["simple", "grouped", "external", "variable"] }
|
|
},
|
|
{
|
|
"name": "sku",
|
|
"in": "query",
|
|
"description": "Limit result set to products with specific SKU(s). Use commas to separate.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"in": "query",
|
|
"description": "Limit result set to featured products.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific category ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific tag ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "shipping_class",
|
|
"in": "query",
|
|
"description": "Limit result set to products assigned a specific shipping class ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "attribute_term",
|
|
"in": "query",
|
|
"description": "Limit result set to products with a specific attribute term ID (requires an assigned attribute).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "in_stock",
|
|
"in": "query",
|
|
"description": "Limit result set to products in stock or out of stock.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "on_sale",
|
|
"in": "query",
|
|
"description": "Limit result set to products on sale.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "min_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a minimum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "max_price",
|
|
"in": "query",
|
|
"description": "Limit result set to products based on a maximum price.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "include_meta",
|
|
"in": "query",
|
|
"description": "Limit meta_data to specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "exclude_meta",
|
|
"in": "query",
|
|
"description": "Ensure meta_data excludes specific keys.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/variations/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_variation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variation.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/products/{product_id}/variations/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "product_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the variable product.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "Variation description." },
|
|
"sku": { "type": "string", "description": "Unique identifier." },
|
|
"regular_price": { "type": "string", "description": "Variation regular price." },
|
|
"sale_price": { "type": "string", "description": "Variation sale price." },
|
|
"date_on_sale_from": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_from_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "Start date of sale price, as GMT."
|
|
},
|
|
"date_on_sale_to": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, in the site's timezone."
|
|
},
|
|
"date_on_sale_to_gmt": {
|
|
"type": ["null", "string"],
|
|
"description": "End date of sale price, as GMT."
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "Define if the variation is visible on the product's page."
|
|
},
|
|
"virtual": { "type": "boolean", "description": "If the variation is virtual." },
|
|
"downloadable": { "type": "boolean", "description": "If the variation is downloadable." },
|
|
"downloads": { "type": "array", "description": "List of downloadable files." },
|
|
"download_limit": {
|
|
"type": "integer",
|
|
"description": "Number of times downloadable files can be downloaded after purchase."
|
|
},
|
|
"download_expiry": {
|
|
"type": "integer",
|
|
"description": "Number of days until access to downloadable files expires."
|
|
},
|
|
"tax_status": { "type": "string", "description": "Tax status." },
|
|
"tax_class": { "type": "string", "description": "Tax class." },
|
|
"manage_stock": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Stock management at variation level."
|
|
},
|
|
"stock_quantity": { "type": "integer", "description": "Stock quantity." },
|
|
"in_stock": {
|
|
"type": "boolean",
|
|
"description": "Controls whether or not the variation is listed as \"in stock\" or \"out of stock\" on the front-end."
|
|
},
|
|
"backorders": {
|
|
"type": "string",
|
|
"description": "If managing stock, this controls if back-orders are allowed."
|
|
},
|
|
"weight": { "type": "string", "description": "Variation weight (kg)." },
|
|
"dimensions": { "type": "object", "description": "Variation dimensions." },
|
|
"shipping_class": { "type": "string", "description": "Shipping class slug." },
|
|
"image": { "type": "object", "description": "Variation image data." },
|
|
"attributes": { "type": "array", "description": "List of attributes." },
|
|
"menu_order": { "type": "integer", "description": "Menu order, used to custom sort products." },
|
|
"meta_data": { "type": "array", "description": "Meta data." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/reports/sales": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sales_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/reports/top_sellers": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/top_sellers_report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "period",
|
|
"in": "query",
|
|
"description": "Report period.",
|
|
"required": false,
|
|
"schema": { "enum": ["week", "month", "last_month", "year"] }
|
|
},
|
|
{
|
|
"name": "date_min",
|
|
"in": "query",
|
|
"description": "Return sales for a specific start date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
},
|
|
{
|
|
"name": "date_max",
|
|
"in": "query",
|
|
"description": "Return sales for a specific end date; the date needs to be in the YYYY-MM-DD format.",
|
|
"required": false,
|
|
"schema": { "format": "date" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/reports": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/report" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/settings": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting_group" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/settings/{group_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/settings/{group_id}/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/settings/{group_id}/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "group", "in": "query", "description": "Settings group ID.", "required": false, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/setting" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "group_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": { "type": "string", "description": "Settings group ID." },
|
|
"value": {
|
|
"type": ["null", "object", "string", "number", "boolean", "integer", "array"],
|
|
"description": "Setting value."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping/zones": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping/zones/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Shipping zone name." },
|
|
"order": { "type": "integer", "description": "Shipping zone order." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping/zones/{id}/locations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_location" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "Unique ID for the resource.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "description": "Shipping zone location code." },
|
|
"type": { "type": "string", "description": "Shipping zone location type." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping/zones/{zone_id}/methods": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." },
|
|
"method_id": { "required": true, "description": "Shipping method ID." }
|
|
},
|
|
"required": ["method_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping/zones/{zone_id}/methods/{instance_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": { "type": "integer", "description": "Shipping method sort order." },
|
|
"enabled": { "type": "boolean", "description": "Shipping method enabled status." },
|
|
"settings": { "type": "object", "description": "Shipping method settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_zone_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "zone_id", "in": "path", "description": "Unique ID for the zone.", "required": true, "schema": {} },
|
|
{
|
|
"name": "instance_id",
|
|
"in": "path",
|
|
"description": "Unique ID for the instance.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/taxes/classes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "name": { "type": "string", "required": true, "description": "Tax class name." } },
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/taxes/classes/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Unique slug for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax_class" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "path",
|
|
"description": "Unique slug for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/taxes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "order", "priority"] }
|
|
},
|
|
{
|
|
"name": "class",
|
|
"in": "query",
|
|
"description": "Sort by tax class.",
|
|
"required": false,
|
|
"schema": { "enum": ["standard", "reduced-rate", "zero-rate"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/taxes/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tax" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/taxes/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"country": { "type": "string", "description": "Country ISO 3166 code." },
|
|
"state": { "type": "string", "description": "State code." },
|
|
"postcode": { "type": "string", "description": "Postcode / ZIP." },
|
|
"city": { "type": "string", "description": "City name." },
|
|
"rate": { "type": "string", "description": "Tax rate." },
|
|
"name": { "type": "string", "description": "Tax rate name." },
|
|
"priority": { "type": "integer", "description": "Tax priority." },
|
|
"compound": { "type": "boolean", "description": "Whether or not this is a compound rate." },
|
|
"shipping": {
|
|
"type": "boolean",
|
|
"description": "Whether or not this tax rate also gets applied to shipping."
|
|
},
|
|
"order": { "type": "integer", "description": "Indicates the order that will appear in queries." },
|
|
"class": { "type": "string", "description": "Tax class." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/webhooks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to resources published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to resources published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific ids.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "title"] }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to webhooks assigned a specific status.",
|
|
"required": false,
|
|
"schema": { "enum": ["all", "active", "paused", "disabled"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "required": true, "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
},
|
|
"delivery_url": { "type": "string", "required": true, "description": "Webhook delivery URL." }
|
|
},
|
|
"required": ["topic", "delivery_url"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/webhooks/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as resource does not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/webhooks/batch": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/batch" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "A friendly name for the webhook." },
|
|
"status": { "type": "string", "description": "Webhook status." },
|
|
"topic": { "type": "string", "description": "Webhook topic." },
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/webhooks/{webhook_id}/deliveries": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook_delivery" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "webhook_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the webhook.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/webhooks/{webhook_id}/deliveries/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhook_delivery" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "webhook_id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the webhook.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/system_status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/system_status/tools": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/system_status/tools/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/system_status_tool" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "A unique identifier for the tool.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Tool name." },
|
|
"action": { "type": "string", "description": "What running the tool will do." },
|
|
"description": { "type": "string", "description": "Tool description." },
|
|
"success": { "type": "boolean", "description": "Did the tool run successfully?" },
|
|
"message": { "type": "string", "description": "Tool return message." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc/v2/shipping_methods": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/shipping_methods/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/shipping_method" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/payment_gateways": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wc/v2/payment_gateways/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/payment_gateway" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the resource.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Payment gateway title on checkout." },
|
|
"description": { "type": "string", "description": "Payment gateway description on checkout." },
|
|
"order": { "type": "integer", "description": "Payment gateway sort order." },
|
|
"enabled": { "type": "boolean", "description": "Payment gateway enabled status." },
|
|
"settings": { "type": "object", "description": "Payment gateway settings." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wc-telemetry": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wc-telemetry/tracker": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"platform": { "type": "string", "required": true, "description": "Platform to track." },
|
|
"version": { "type": "string", "required": true, "description": "Platform version to track." },
|
|
"installation_date": {
|
|
"type": "string",
|
|
"required": false,
|
|
"description": "Installation date of the WooCommerce mobile app."
|
|
}
|
|
},
|
|
"required": ["platform", "version"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wccom-site/v3": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wccom-site/v3/installer": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"run-until-step": { "type": "string", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "run-until-step", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"run-until-step": { "type": "string", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "run-until-step", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"run-until-step": { "type": "string", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "run-until-step", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wccom-site/v3/installer/reset": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product-id": { "type": "integer", "required": true },
|
|
"idempotency-key": { "type": "string", "required": true }
|
|
},
|
|
"required": ["product-id", "idempotency-key"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wccom-site/v3/ssr": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wccom-site/v3/status": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/carbon-fields/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/posts/{id}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/terms/{id}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/users/{id}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/comments/{id}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/options": {
|
|
"get": { "responses": { "200": { "description": "OK" } } },
|
|
"post": { "responses": { "200": { "description": "OK" } } }
|
|
},
|
|
"/carbon-fields/v1/association": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/carbon-fields/v1/association/options": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/carbon-fields/v1/attachment": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "The requested type: ID or URL.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "value",
|
|
"in": "query",
|
|
"description": "The ID / URL of the attachment",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/carbon-fields/v1/block-renderer": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "required": true, "description": "The name of the block." },
|
|
"content": { "type": "string", "required": true, "description": "The content of the block." },
|
|
"post_id": { "type": "integer", "description": "ID of the post context." }
|
|
},
|
|
"required": ["name", "content"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/posts": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "author",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "author_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "tax_relation",
|
|
"in": "query",
|
|
"description": "Limit result set based on relationship between multiple taxonomies.",
|
|
"required": false,
|
|
"schema": { "enum": ["AND", "OR"] }
|
|
},
|
|
{
|
|
"name": "categories",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the categories taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"include_children": {
|
|
"description": "Whether to include child terms in the terms limiting the result set.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "categories_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the categories taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"include_children": {
|
|
"description": "Whether to include child terms in the terms limiting the result set.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the tags taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "tags_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the tags taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "sticky",
|
|
"in": "query",
|
|
"description": "Limit result set to items that are sticky.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"format": { "type": "string", "description": "The format for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"sticky": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the post should be treated as sticky."
|
|
},
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the category taxonomy."
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the post_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/posts/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "excerpt_length",
|
|
"in": "query",
|
|
"description": "Override the default excerpt length.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"format": { "type": "string", "description": "The format for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"sticky": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the post should be treated as sticky."
|
|
},
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the category taxonomy."
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the post_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"format": { "type": "string", "description": "The format for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"sticky": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the post should be treated as sticky."
|
|
},
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the category taxonomy."
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the post_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"format": { "type": "string", "description": "The format for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"sticky": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the post should be treated as sticky."
|
|
},
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the category taxonomy."
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the post_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/posts/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/posts/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/posts/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the autosave." },
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"format": { "type": "string", "description": "The format for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"sticky": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the post should be treated as sticky."
|
|
},
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the category taxonomy."
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the post_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/posts/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/post-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/pages": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "author",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "author_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "menu_order",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with a specific menu_order value.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title",
|
|
"menu_order"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to items with particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The order of the post in relation to other posts."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/pages/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "excerpt_length",
|
|
"in": "query",
|
|
"description": "Override the default excerpt length.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The order of the post in relation to other posts."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The order of the post in relation to other posts."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The order of the post in relation to other posts."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/pages/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/pages/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/pages/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The order of the post in relation to other posts."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/pages/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/page-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/media": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "author",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "author_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes posts assigned to specific authors.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to items with particular parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to all items except those of a particular parent ID.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["inherit", "private", "trash"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "media_type",
|
|
"in": "query",
|
|
"description": "Limit result set to attachments of a particular media type.",
|
|
"required": false,
|
|
"schema": { "enum": ["image", "video", "application"] }
|
|
},
|
|
{
|
|
"name": "mime_type",
|
|
"in": "query",
|
|
"description": "Limit result set to attachments of a particular MIME type.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"alt_text": {
|
|
"type": "string",
|
|
"description": "Alternative text to display when attachment is not displayed."
|
|
},
|
|
"caption": { "type": "object", "description": "The attachment caption." },
|
|
"description": { "type": "object", "description": "The attachment description." },
|
|
"post": { "type": "integer", "description": "The ID for the associated post of the attachment." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/media/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"alt_text": {
|
|
"type": "string",
|
|
"description": "Alternative text to display when attachment is not displayed."
|
|
},
|
|
"caption": { "type": "object", "description": "The attachment caption." },
|
|
"description": { "type": "object", "description": "The attachment description." },
|
|
"post": { "type": "integer", "description": "The ID for the associated post of the attachment." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"alt_text": {
|
|
"type": "string",
|
|
"description": "Alternative text to display when attachment is not displayed."
|
|
},
|
|
"caption": { "type": "object", "description": "The attachment caption." },
|
|
"description": { "type": "object", "description": "The attachment description." },
|
|
"post": { "type": "integer", "description": "The ID for the associated post of the attachment." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"comment_status": {
|
|
"type": "string",
|
|
"description": "Whether or not comments are open on the post."
|
|
},
|
|
"ping_status": { "type": "string", "description": "Whether or not the post can be pinged." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"alt_text": {
|
|
"type": "string",
|
|
"description": "Alternative text to display when attachment is not displayed."
|
|
},
|
|
"caption": { "type": "object", "description": "The attachment caption." },
|
|
"description": { "type": "object", "description": "The attachment description." },
|
|
"post": { "type": "integer", "description": "The ID for the associated post of the attachment." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/attachment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/media/{id}/post-process": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the attachment.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "required": true } },
|
|
"required": ["action"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/media/{id}/edit": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"src": { "type": "string", "required": true, "description": "URL to the edited image file." },
|
|
"modifiers": { "type": "array", "description": "Array of image edits." },
|
|
"rotation": {
|
|
"type": "integer",
|
|
"description": "The amount to rotate the image clockwise in degrees. DEPRECATED: use `modifiers` instead."
|
|
},
|
|
"x": {
|
|
"type": "number",
|
|
"description": "As a percentage of the image, the x position from which to start the crop. DEPRECATED: use `modifiers` instead."
|
|
},
|
|
"y": {
|
|
"type": "number",
|
|
"description": "As a percentage of the image, the y position from which to start the crop. DEPRECATED: use `modifiers` instead."
|
|
},
|
|
"width": {
|
|
"type": "number",
|
|
"description": "As a percentage of the image, the width to which to crop the image. DEPRECATED: use `modifiers` instead."
|
|
},
|
|
"height": {
|
|
"type": "number",
|
|
"description": "As a percentage of the image, the height to which to crop the image. DEPRECATED: use `modifiers` instead."
|
|
}
|
|
},
|
|
"required": ["src"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menu-items": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title",
|
|
"menu_order"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "tax_relation",
|
|
"in": "query",
|
|
"description": "Limit result set based on relationship between multiple taxonomies.",
|
|
"required": false,
|
|
"schema": { "enum": ["AND", "OR"] }
|
|
},
|
|
{
|
|
"name": "menus",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the menus taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "menus_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the menus taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "menu_order",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with a specific menu_order value.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": ["string", "object"], "description": "The title for the object." },
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\"."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"attr_title": {
|
|
"type": "string",
|
|
"description": "Text for the title attribute of the link element for this menu item."
|
|
},
|
|
"classes": { "type": "array", "description": "Class names for the link element of this menu item." },
|
|
"description": { "type": "string", "description": "The description of this menu item." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\"."
|
|
},
|
|
"object_id": {
|
|
"type": "integer",
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories."
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "The target attribute of the link element for this menu item."
|
|
},
|
|
"url": { "type": "string", "description": "The URL to which this menu item points." },
|
|
"xfn": {
|
|
"type": "array",
|
|
"description": "The XFN relationship expressed in the link of this menu item."
|
|
},
|
|
"menus": {
|
|
"type": "integer",
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menu-items/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": ["string", "object"], "description": "The title for the object." },
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\"."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"attr_title": {
|
|
"type": "string",
|
|
"description": "Text for the title attribute of the link element for this menu item."
|
|
},
|
|
"classes": { "type": "array", "description": "Class names for the link element of this menu item." },
|
|
"description": { "type": "string", "description": "The description of this menu item." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\"."
|
|
},
|
|
"object_id": {
|
|
"type": "integer",
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories."
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "The target attribute of the link element for this menu item."
|
|
},
|
|
"url": { "type": "string", "description": "The URL to which this menu item points." },
|
|
"xfn": {
|
|
"type": "array",
|
|
"description": "The XFN relationship expressed in the link of this menu item."
|
|
},
|
|
"menus": {
|
|
"type": "integer",
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": ["string", "object"], "description": "The title for the object." },
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\"."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"attr_title": {
|
|
"type": "string",
|
|
"description": "Text for the title attribute of the link element for this menu item."
|
|
},
|
|
"classes": { "type": "array", "description": "Class names for the link element of this menu item." },
|
|
"description": { "type": "string", "description": "The description of this menu item." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\"."
|
|
},
|
|
"object_id": {
|
|
"type": "integer",
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories."
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "The target attribute of the link element for this menu item."
|
|
},
|
|
"url": { "type": "string", "description": "The URL to which this menu item points." },
|
|
"xfn": {
|
|
"type": "array",
|
|
"description": "The XFN relationship expressed in the link of this menu item."
|
|
},
|
|
"menus": {
|
|
"type": "integer",
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": ["string", "object"], "description": "The title for the object." },
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\"."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"attr_title": {
|
|
"type": "string",
|
|
"description": "Text for the title attribute of the link element for this menu item."
|
|
},
|
|
"classes": { "type": "array", "description": "Class names for the link element of this menu item." },
|
|
"description": { "type": "string", "description": "The description of this menu item." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\"."
|
|
},
|
|
"object_id": {
|
|
"type": "integer",
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories."
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "The target attribute of the link element for this menu item."
|
|
},
|
|
"url": { "type": "string", "description": "The URL to which this menu item points." },
|
|
"xfn": {
|
|
"type": "array",
|
|
"description": "The XFN relationship expressed in the link of this menu item."
|
|
},
|
|
"menus": {
|
|
"type": "integer",
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menu-items/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the object." },
|
|
"title": { "type": ["string", "object"], "description": "The title for the object." },
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The family of objects originally represented, such as \"post_type\" or \"taxonomy\"."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"attr_title": {
|
|
"type": "string",
|
|
"description": "Text for the title attribute of the link element for this menu item."
|
|
},
|
|
"classes": { "type": "array", "description": "Class names for the link element of this menu item." },
|
|
"description": { "type": "string", "description": "The description of this menu item." },
|
|
"menu_order": {
|
|
"type": "integer",
|
|
"description": "The DB ID of the nav_menu_item that is this item's menu parent, if any, otherwise 0."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "The type of object originally represented, such as \"category\", \"post\", or \"attachment\"."
|
|
},
|
|
"object_id": {
|
|
"type": "integer",
|
|
"description": "The database ID of the original object this menu item represents, for example the ID for posts or the term_id for categories."
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "The target attribute of the link element for this menu item."
|
|
},
|
|
"url": { "type": "string", "description": "The URL to which this menu item points." },
|
|
"xfn": {
|
|
"type": "array",
|
|
"description": "The XFN relationship expressed in the link of this menu item."
|
|
},
|
|
"menus": {
|
|
"type": "integer",
|
|
"description": "The terms assigned to the object in the nav_menu taxonomy."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menu-items/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/nav_menu_item-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/blocks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "tax_relation",
|
|
"in": "query",
|
|
"description": "Limit result set based on relationship between multiple taxonomies.",
|
|
"required": false,
|
|
"schema": { "enum": ["AND", "OR"] }
|
|
},
|
|
{
|
|
"name": "wp_pattern_category",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the wp_pattern_category taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "wp_pattern_category_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the wp_pattern_category taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"wp_pattern_category": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/blocks/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "excerpt_length",
|
|
"in": "query",
|
|
"description": "Override the default excerpt length.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"wp_pattern_category": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"wp_pattern_category": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"wp_pattern_category": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/blocks/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/blocks/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/blocks/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the autosave." },
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"wp_pattern_category": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the wp_pattern_category taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/blocks/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_block-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/templates/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/templates/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/templates/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/templates/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/templates": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "wp_id",
|
|
"in": "query",
|
|
"description": "Limit to the specified post ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "area",
|
|
"in": "query",
|
|
"description": "Limit to the specified template part area.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post_type",
|
|
"in": "query",
|
|
"description": "Post type for which to get the templates.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Unique slug identifying the template."
|
|
},
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." }
|
|
},
|
|
"required": ["slug"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/templates/lookup": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "The slug of the template to get the fallback for",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "is_custom",
|
|
"in": "query",
|
|
"description": "Indicates if a template is custom or part of the template hierarchy",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "template_prefix",
|
|
"in": "query",
|
|
"description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/templates/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." },
|
|
"area": {
|
|
"type": "string",
|
|
"description": "Where the template part is intended for use (header, footer, etc)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "parent", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/template-parts": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "wp_id",
|
|
"in": "query",
|
|
"description": "Limit to the specified post ID.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "area",
|
|
"in": "query",
|
|
"description": "Limit to the specified template part area.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post_type",
|
|
"in": "query",
|
|
"description": "Post type for which to get the templates.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Unique slug identifying the template."
|
|
},
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." },
|
|
"area": {
|
|
"type": "string",
|
|
"description": "Where the template part is intended for use (header, footer, etc)"
|
|
}
|
|
},
|
|
"required": ["slug"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/lookup": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "The slug of the template to get the fallback for",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "is_custom",
|
|
"in": "query",
|
|
"description": "Indicates if a template is custom or part of the template hierarchy",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "template_prefix",
|
|
"in": "query",
|
|
"description": "The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/template-parts/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." },
|
|
"area": {
|
|
"type": "string",
|
|
"description": "Where the template part is intended for use (header, footer, etc)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." },
|
|
"area": {
|
|
"type": "string",
|
|
"description": "Where the template part is intended for use (header, footer, etc)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "description": "Unique slug identifying the template." },
|
|
"theme": { "type": "string", "description": "Theme identifier for the template." },
|
|
"type": { "type": "string", "description": "Type of template." },
|
|
"content": { "type": ["object", "string"], "description": "Content of template." },
|
|
"title": { "type": ["object", "string"], "description": "Title of template." },
|
|
"description": { "type": "string", "description": "Description of template." },
|
|
"status": { "type": "string", "description": "Status of template." },
|
|
"author": { "type": "integer", "description": "The ID for the author of the template." },
|
|
"area": {
|
|
"type": "string",
|
|
"description": "Where the template part is intended for use (header, footer, etc)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_template_part" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/global-styles/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/global-styles/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the global styles revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the global styles revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/global-styles/themes/{stylesheet}/variations": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "stylesheet", "in": "path", "description": "The theme identifier", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/global-styles/themes/{stylesheet}": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "stylesheet", "in": "path", "description": "The theme identifier", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/global-styles/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The ID of a template", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"styles": { "type": ["object"], "description": "Global styles." },
|
|
"settings": { "type": ["object"], "description": "Global settings." },
|
|
"title": { "type": ["object", "string"], "description": "Title of the global styles variation." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"styles": { "type": ["object"], "description": "Global styles." },
|
|
"settings": { "type": ["object"], "description": "Global settings." },
|
|
"title": { "type": ["object", "string"], "description": "Title of the global styles variation." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_global_styles" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"styles": { "type": ["object"], "description": "Global styles." },
|
|
"settings": { "type": ["object"], "description": "Global settings." },
|
|
"title": { "type": ["object", "string"], "description": "Title of the global styles variation." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/navigation": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/navigation/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/navigation/{parent}/revisions": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by object attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "id", "include", "relevance", "slug", "include_slugs", "title"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/navigation/{parent}/revisions/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the revision.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as revisions do not support binning."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/navigation/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the autosave." },
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/navigation/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/wp_navigation-revision" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/font-families": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include"] }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"theme_json_version": {
|
|
"type": "integer",
|
|
"description": "Version of the theme.json schema used for the typography settings."
|
|
},
|
|
"font_family_settings": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "font-family declaration in theme.json format, encoded as a string."
|
|
}
|
|
},
|
|
"required": ["font_family_settings"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/font-families/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"theme_json_version": {
|
|
"type": "integer",
|
|
"description": "Version of the theme.json schema used for the typography settings."
|
|
},
|
|
"font_family_settings": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "font-family declaration in theme.json format, encoded as a string."
|
|
}
|
|
},
|
|
"required": ["font_family_settings"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"theme_json_version": {
|
|
"type": "integer",
|
|
"description": "Version of the theme.json schema used for the typography settings."
|
|
},
|
|
"font_family_settings": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "font-family declaration in theme.json format, encoded as a string."
|
|
}
|
|
},
|
|
"required": ["font_family_settings"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"theme_json_version": {
|
|
"type": "integer",
|
|
"description": "Version of the theme.json schema used for the typography settings."
|
|
},
|
|
"font_family_settings": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "font-family declaration in theme.json format, encoded as a string."
|
|
}
|
|
},
|
|
"required": ["font_family_settings"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_family" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/font-families/{font_family_id}/font-faces": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_face" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "font_family_id",
|
|
"in": "path",
|
|
"description": "The ID for the parent font family of the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_face" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "font_family_id",
|
|
"in": "path",
|
|
"description": "The ID for the parent font family of the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"theme_json_version": {
|
|
"type": "integer",
|
|
"description": "Version of the theme.json schema used for the typography settings."
|
|
},
|
|
"font_face_settings": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "font-face declaration in theme.json format, encoded as a string."
|
|
}
|
|
},
|
|
"required": ["font_face_settings"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/font-families/{font_family_id}/font-faces/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_face" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "font_family_id",
|
|
"in": "path",
|
|
"description": "The ID for the parent font family of the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_font_face" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "font_family_id",
|
|
"in": "path",
|
|
"description": "The ID for the parent font family of the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the font face.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to posts published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_after",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to posts published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "modified_before",
|
|
"in": "query",
|
|
"description": "Limit response to posts modified before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title",
|
|
"popularity",
|
|
"rating",
|
|
"popularity",
|
|
"rating"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_columns",
|
|
"in": "query",
|
|
"description": "Array of column names to be searched.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["post_title", "post_content", "post_excerpt"], "type": "string" } }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to posts with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to posts assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": [
|
|
"publish",
|
|
"future",
|
|
"draft",
|
|
"pending",
|
|
"private",
|
|
"trash",
|
|
"auto-draft",
|
|
"inherit",
|
|
"request-pending",
|
|
"request-confirmed",
|
|
"request-failed",
|
|
"request-completed",
|
|
"wc-pending",
|
|
"wc-processing",
|
|
"wc-on-hold",
|
|
"wc-completed",
|
|
"wc-cancelled",
|
|
"wc-refunded",
|
|
"wc-failed",
|
|
"wc-checkout-draft",
|
|
"any"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "tax_relation",
|
|
"in": "query",
|
|
"description": "Limit result set based on relationship between multiple taxonomies.",
|
|
"required": false,
|
|
"schema": { "enum": ["AND", "OR"] }
|
|
},
|
|
{
|
|
"name": "product_cat",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the product_cat taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"include_children": {
|
|
"description": "Whether to include child terms in the terms limiting the result set.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "product_cat_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the product_cat taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"include_children": {
|
|
"description": "Whether to include child terms in the terms limiting the result set.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "product_tag",
|
|
"in": "query",
|
|
"description": "Limit result set to items with specific terms assigned in the product_tag taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
},
|
|
"operator": {
|
|
"description": "Whether items must be assigned all or any of the specified terms.",
|
|
"type": "string",
|
|
"enum": ["AND", "OR"],
|
|
"default": "OR"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "product_tag_exclude",
|
|
"in": "query",
|
|
"description": "Limit result set to items, except those with specific terms assigned in the product_tag taxonomy.",
|
|
"required": false,
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"title": "Term ID List",
|
|
"description": "Match terms with the listed IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" }
|
|
},
|
|
{
|
|
"title": "Term ID Taxonomy Query",
|
|
"description": "Perform an advanced term query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"terms": {
|
|
"description": "Term IDs.",
|
|
"type": "array",
|
|
"items": { "type": "integer" },
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"product_cat": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_cat taxonomy."
|
|
},
|
|
"product_tag": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "excerpt_length",
|
|
"in": "query",
|
|
"description": "Override the default excerpt length.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"product_cat": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_cat taxonomy."
|
|
},
|
|
"product_tag": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"product_cat": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_cat taxonomy."
|
|
},
|
|
"product_tag": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"product_cat": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_cat taxonomy."
|
|
},
|
|
"product_tag": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the post.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product/{id}/autosaves": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the autosave." },
|
|
"date": {
|
|
"type": ["string", "null"],
|
|
"description": "The date the post was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": ["string", "null"], "description": "The date the post was published, as GMT." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the post unique to its type."
|
|
},
|
|
"status": { "type": "string", "description": "A named status for the object." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A password to protect access to the content and excerpt."
|
|
},
|
|
"title": { "type": "object", "description": "The title for the post." },
|
|
"content": { "type": "object", "description": "The content for the post." },
|
|
"excerpt": { "type": "object", "description": "The excerpt for the post." },
|
|
"featured_media": { "type": "integer", "description": "The ID of the featured media for the post." },
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"template": { "type": "string", "description": "The theme file to use to display the post." },
|
|
"product_cat": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_cat taxonomy."
|
|
},
|
|
"product_tag": {
|
|
"type": "array",
|
|
"description": "The terms assigned to the object in the product_tag taxonomy."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product/{parent}/autosaves/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product-revision" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "parent",
|
|
"in": "path",
|
|
"description": "The ID for the parent of the autosave.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{ "name": "id", "in": "path", "description": "The ID for the autosave.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/types": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/types/{type}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"description": "An alphanumeric identifier for the post type.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/statuses": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/status" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/statuses/{status}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/status" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "path",
|
|
"description": "An alphanumeric identifier for the status.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/taxonomies": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/taxonomy" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit results to taxonomies associated with a specific post type.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/taxonomies/{taxonomy}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/taxonomy" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "taxonomy",
|
|
"in": "path",
|
|
"description": "An alphanumeric identifier for the taxonomy.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific parent.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/categories/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/tags/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menus": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"locations": { "type": "array", "description": "The locations assigned to the menu." },
|
|
"auto_add": {
|
|
"type": "boolean",
|
|
"description": "Whether to automatically add top-level pages to this menu."
|
|
}
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menus/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"locations": { "type": "array", "description": "The locations assigned to the menu." },
|
|
"auto_add": {
|
|
"type": "boolean",
|
|
"description": "Whether to automatically add top-level pages to this menu."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"locations": { "type": "array", "description": "The locations assigned to the menu." },
|
|
"auto_add": {
|
|
"type": "boolean",
|
|
"description": "Whether to automatically add top-level pages to this menu."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." },
|
|
"locations": { "type": "array", "description": "The locations assigned to the menu." },
|
|
"auto_add": {
|
|
"type": "boolean",
|
|
"description": "Whether to automatically add top-level pages to this menu."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/nav_menu" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/wp_pattern_category": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/wp_pattern_category/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp_pattern_category" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product_cat": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific parent.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product_cat/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"parent": { "type": "integer", "description": "The parent term ID." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_cat" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product_tag": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by term attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": ["id", "include", "name", "slug", "include_slugs", "term_group", "description", "count"]
|
|
}
|
|
},
|
|
{
|
|
"name": "hide_empty",
|
|
"in": "query",
|
|
"description": "Whether to hide terms not assigned to any posts.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to terms assigned to a specific post.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to terms with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "required": true, "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/product_tag/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": { "type": "string", "description": "HTML description of the term." },
|
|
"name": { "type": "string", "description": "HTML title for the term." },
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "An alphanumeric identifier for the term unique to its type."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/product_tag" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the term.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Required to be true, as terms do not support binning." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/users": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by user attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["id", "include", "name", "registered_date", "slug", "include_slugs", "email", "url"] }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit result set to users with one or more specific slugs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "roles",
|
|
"in": "query",
|
|
"description": "Limit result set to users matching at least one specific role provided. Accepts csv list or single role.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "capabilities",
|
|
"in": "query",
|
|
"description": "Limit result set to users matching at least one specific capability provided. Accepts csv list or single capability.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string" } }
|
|
},
|
|
{
|
|
"name": "who",
|
|
"in": "query",
|
|
"description": "Limit result set to users who are considered authors.",
|
|
"required": false,
|
|
"schema": { "enum": ["authors"] }
|
|
},
|
|
{
|
|
"name": "has_published_posts",
|
|
"in": "query",
|
|
"description": "Limit result set to users who have published posts.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"type": "string",
|
|
"enum": {
|
|
"post": "post",
|
|
"page": "page",
|
|
"attachment": "attachment",
|
|
"nav_menu_item": "nav_menu_item",
|
|
"wp_block": "wp_block",
|
|
"wp_template": "wp_template",
|
|
"wp_template_part": "wp_template_part",
|
|
"wp_global_styles": "wp_global_styles",
|
|
"wp_navigation": "wp_navigation",
|
|
"wp_font_family": "wp_font_family",
|
|
"wp_font_face": "wp_font_face",
|
|
"product": "product"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "required": true, "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "required": true, "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Password for the user (never included)."
|
|
},
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
},
|
|
"required": ["username", "email", "password"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/users/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the user.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the user.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the user.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the user.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the user.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as users do not support binning."
|
|
},
|
|
"reassign": {
|
|
"type": "integer",
|
|
"required": true,
|
|
"description": "Reassign the deleted user's posts and links to this user ID."
|
|
}
|
|
},
|
|
"required": ["reassign"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/users/me": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string", "description": "Login name for the user." },
|
|
"name": { "type": "string", "description": "Display name for the user." },
|
|
"first_name": { "type": "string", "description": "First name for the user." },
|
|
"last_name": { "type": "string", "description": "Last name for the user." },
|
|
"email": { "type": "string", "description": "The email address for the user." },
|
|
"url": { "type": "string", "description": "URL of the user." },
|
|
"description": { "type": "string", "description": "Description of the user." },
|
|
"locale": { "type": "string", "description": "Locale for the user." },
|
|
"nickname": { "type": "string", "description": "The nickname for the user." },
|
|
"slug": { "type": "string", "description": "An alphanumeric identifier for the user." },
|
|
"roles": { "type": "array", "description": "Roles assigned to the user." },
|
|
"password": { "type": "string", "description": "Password for the user (never included)." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Required to be true, as users do not support binning."
|
|
},
|
|
"reassign": {
|
|
"type": "integer",
|
|
"required": true,
|
|
"description": "Reassign the deleted user's posts and links to this user ID."
|
|
}
|
|
},
|
|
"required": ["reassign"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/users/{user_id}/application-passwords": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string",
|
|
"description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace."
|
|
},
|
|
"name": { "type": "string", "required": true, "description": "The name of the application password." }
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} }]
|
|
}
|
|
},
|
|
"/wp/v2/users/{user_id}/application-passwords/introspect": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/users/{user_id}/application-passwords/{uuid}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "uuid", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "uuid", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string",
|
|
"description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace."
|
|
},
|
|
"name": { "type": "string", "description": "The name of the application password." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "uuid", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string",
|
|
"description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace."
|
|
},
|
|
"name": { "type": "string", "description": "The name of the application password." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "uuid", "in": "path", "description": "", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string",
|
|
"description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace."
|
|
},
|
|
"name": { "type": "string", "description": "The name of the application password." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/application-password" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "user_id", "in": "path", "description": "", "required": true, "schema": {} },
|
|
{ "name": "uuid", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/comments": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Limit response to comments published after a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "author",
|
|
"in": "query",
|
|
"description": "Limit result set to comments assigned to specific user IDs. Requires authorisation.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "author_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes comments assigned to specific user IDs. Requires authorisation.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "author_email",
|
|
"in": "query",
|
|
"description": "Limit result set to that from a specific author email. Requires authorisation.",
|
|
"required": false,
|
|
"schema": { "format": "email" }
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Limit response to comments published before a given ISO8601 compliant date.",
|
|
"required": false,
|
|
"schema": { "format": "date-time" }
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by comment attribute.",
|
|
"required": false,
|
|
"schema": { "enum": ["date", "date_gmt", "id", "include", "post", "parent", "type"] }
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"in": "query",
|
|
"description": "Limit result set to comments of specific parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "parent_exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific parent IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "post",
|
|
"in": "query",
|
|
"description": "Limit result set to comments assigned to specific post IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to comments assigned a specific status. Requires authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit result set to comments assigned a specific type. Requires authorisation.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the post if it is password protected.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": { "type": "integer", "description": "The ID of the user object, if author was a user." },
|
|
"author_email": { "type": "string", "description": "Email address for the comment author." },
|
|
"author_ip": { "type": "string", "description": "IP address for the comment author." },
|
|
"author_name": { "type": "string", "description": "Display name for the comment author." },
|
|
"author_url": { "type": "string", "description": "URL for the comment author." },
|
|
"author_user_agent": { "type": "string", "description": "User agent for the comment author." },
|
|
"content": { "type": "object", "description": "The content for the comment." },
|
|
"date": {
|
|
"type": "string",
|
|
"description": "The date the comment was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": "string", "description": "The date the comment was published, as GMT." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the comment." },
|
|
"post": { "type": "integer", "description": "The ID of the associated post object." },
|
|
"status": { "type": "string", "description": "State of the comment." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/comments/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the comment.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "password",
|
|
"in": "query",
|
|
"description": "The password for the parent post of the comment (if the post is password protected).",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the comment.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": { "type": "integer", "description": "The ID of the user object, if author was a user." },
|
|
"author_email": { "type": "string", "description": "Email address for the comment author." },
|
|
"author_ip": { "type": "string", "description": "IP address for the comment author." },
|
|
"author_name": { "type": "string", "description": "Display name for the comment author." },
|
|
"author_url": { "type": "string", "description": "URL for the comment author." },
|
|
"author_user_agent": { "type": "string", "description": "User agent for the comment author." },
|
|
"content": { "type": "object", "description": "The content for the comment." },
|
|
"date": {
|
|
"type": "string",
|
|
"description": "The date the comment was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": "string", "description": "The date the comment was published, as GMT." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the comment." },
|
|
"post": { "type": "integer", "description": "The ID of the associated post object." },
|
|
"status": { "type": "string", "description": "State of the comment." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the comment.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": { "type": "integer", "description": "The ID of the user object, if author was a user." },
|
|
"author_email": { "type": "string", "description": "Email address for the comment author." },
|
|
"author_ip": { "type": "string", "description": "IP address for the comment author." },
|
|
"author_name": { "type": "string", "description": "Display name for the comment author." },
|
|
"author_url": { "type": "string", "description": "URL for the comment author." },
|
|
"author_user_agent": { "type": "string", "description": "User agent for the comment author." },
|
|
"content": { "type": "object", "description": "The content for the comment." },
|
|
"date": {
|
|
"type": "string",
|
|
"description": "The date the comment was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": "string", "description": "The date the comment was published, as GMT." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the comment." },
|
|
"post": { "type": "integer", "description": "The ID of the associated post object." },
|
|
"status": { "type": "string", "description": "State of the comment." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the comment.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"author": { "type": "integer", "description": "The ID of the user object, if author was a user." },
|
|
"author_email": { "type": "string", "description": "Email address for the comment author." },
|
|
"author_ip": { "type": "string", "description": "IP address for the comment author." },
|
|
"author_name": { "type": "string", "description": "Display name for the comment author." },
|
|
"author_url": { "type": "string", "description": "URL for the comment author." },
|
|
"author_user_agent": { "type": "string", "description": "User agent for the comment author." },
|
|
"content": { "type": "object", "description": "The content for the comment." },
|
|
"date": {
|
|
"type": "string",
|
|
"description": "The date the comment was published, in the site's time zone."
|
|
},
|
|
"date_gmt": { "type": "string", "description": "The date the comment was published, as GMT." },
|
|
"parent": { "type": "integer", "description": "The ID for the parent of the comment." },
|
|
"post": { "type": "integer", "description": "The ID of the associated post object." },
|
|
"status": { "type": "string", "description": "State of the comment." },
|
|
"meta": { "type": "object", "description": "Meta fields." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/comment" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the comment.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": { "type": "boolean", "description": "Whether to bypass Bin and force deletion." },
|
|
"password": {
|
|
"type": "string",
|
|
"description": "The password for the parent post of the comment (if the post is password protected)."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/search": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/search-result" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"description": "Limit results to items of an object type.",
|
|
"required": false,
|
|
"schema": { "enum": ["post", "term", "post-format"] }
|
|
},
|
|
{
|
|
"name": "subtype",
|
|
"in": "query",
|
|
"description": "Limit results to items of one or more object subtypes.",
|
|
"required": false,
|
|
"schema": {
|
|
"items": {
|
|
"enum": ["post", "page", "product", "category", "post_tag", "product_cat", "product_tag", "any"],
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "exclude",
|
|
"in": "query",
|
|
"description": "Ensure result set excludes specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
},
|
|
{
|
|
"name": "include",
|
|
"in": "query",
|
|
"description": "Limit result set to specific IDs.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "integer" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/block-renderer/{name}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/rendered-block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Unique registered name for the block.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["edit"] }
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "query",
|
|
"description": "Attributes for the block.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "post_id",
|
|
"in": "query",
|
|
"description": "ID of the post context.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/rendered-block" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Unique registered name for the block.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"attributes": { "type": "object", "description": "Attributes for the block." },
|
|
"post_id": { "type": "integer", "description": "ID of the post context." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/block-types": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/block-type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "namespace", "in": "query", "description": "Block namespace.", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/block-types/{namespace}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/block-type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "namespace", "in": "path", "description": "Block namespace.", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/block-types/{namespace}/{name}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/block-type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "name", "in": "path", "description": "Block name.", "required": true, "schema": {} },
|
|
{ "name": "namespace", "in": "path", "description": "Block namespace.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/settings": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/settings" } } }
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/settings" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Site title." },
|
|
"description": { "type": "string", "description": "Site tagline." },
|
|
"url": { "type": "string", "description": "Site URL." },
|
|
"email": {
|
|
"type": "string",
|
|
"description": "This address is used for admin purposes, like new user notification."
|
|
},
|
|
"timezone": { "type": "string", "description": "A city in the same timezone as you." },
|
|
"date_format": { "type": "string", "description": "A date format for all date strings." },
|
|
"time_format": { "type": "string", "description": "A time format for all time strings." },
|
|
"start_of_week": {
|
|
"type": "integer",
|
|
"description": "A day number of the week that the week should start on."
|
|
},
|
|
"language": { "type": "string", "description": "WordPress locale code." },
|
|
"use_smilies": {
|
|
"type": "boolean",
|
|
"description": "Convert emoticons like :-) and :-P to graphics on display."
|
|
},
|
|
"default_category": { "type": "integer", "description": "Default post category." },
|
|
"default_post_format": { "type": "string", "description": "Default post format." },
|
|
"posts_per_page": { "type": "integer", "description": "Blog pages show at most." },
|
|
"show_on_front": { "type": "string", "description": "What to show on the front page" },
|
|
"page_on_front": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should be displayed on the front page"
|
|
},
|
|
"page_for_posts": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should display the latest posts"
|
|
},
|
|
"default_ping_status": {
|
|
"type": "string",
|
|
"description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles."
|
|
},
|
|
"default_comment_status": {
|
|
"type": "string",
|
|
"description": "Allow people to submit comments on new posts."
|
|
},
|
|
"site_logo": { "type": "integer", "description": "Site logo." },
|
|
"site_icon": { "type": "integer", "description": "Site icon." },
|
|
"pickup_location_settings": {
|
|
"type": "object",
|
|
"description": "WooCommerce Local Pickup Method Settings"
|
|
},
|
|
"pickup_locations": { "type": "array", "description": "WooCommerce Local Pickup Locations" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/settings" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Site title." },
|
|
"description": { "type": "string", "description": "Site tagline." },
|
|
"url": { "type": "string", "description": "Site URL." },
|
|
"email": {
|
|
"type": "string",
|
|
"description": "This address is used for admin purposes, like new user notification."
|
|
},
|
|
"timezone": { "type": "string", "description": "A city in the same timezone as you." },
|
|
"date_format": { "type": "string", "description": "A date format for all date strings." },
|
|
"time_format": { "type": "string", "description": "A time format for all time strings." },
|
|
"start_of_week": {
|
|
"type": "integer",
|
|
"description": "A day number of the week that the week should start on."
|
|
},
|
|
"language": { "type": "string", "description": "WordPress locale code." },
|
|
"use_smilies": {
|
|
"type": "boolean",
|
|
"description": "Convert emoticons like :-) and :-P to graphics on display."
|
|
},
|
|
"default_category": { "type": "integer", "description": "Default post category." },
|
|
"default_post_format": { "type": "string", "description": "Default post format." },
|
|
"posts_per_page": { "type": "integer", "description": "Blog pages show at most." },
|
|
"show_on_front": { "type": "string", "description": "What to show on the front page" },
|
|
"page_on_front": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should be displayed on the front page"
|
|
},
|
|
"page_for_posts": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should display the latest posts"
|
|
},
|
|
"default_ping_status": {
|
|
"type": "string",
|
|
"description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles."
|
|
},
|
|
"default_comment_status": {
|
|
"type": "string",
|
|
"description": "Allow people to submit comments on new posts."
|
|
},
|
|
"site_logo": { "type": "integer", "description": "Site logo." },
|
|
"site_icon": { "type": "integer", "description": "Site icon." },
|
|
"pickup_location_settings": {
|
|
"type": "object",
|
|
"description": "WooCommerce Local Pickup Method Settings"
|
|
},
|
|
"pickup_locations": { "type": "array", "description": "WooCommerce Local Pickup Locations" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/settings" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Site title." },
|
|
"description": { "type": "string", "description": "Site tagline." },
|
|
"url": { "type": "string", "description": "Site URL." },
|
|
"email": {
|
|
"type": "string",
|
|
"description": "This address is used for admin purposes, like new user notification."
|
|
},
|
|
"timezone": { "type": "string", "description": "A city in the same timezone as you." },
|
|
"date_format": { "type": "string", "description": "A date format for all date strings." },
|
|
"time_format": { "type": "string", "description": "A time format for all time strings." },
|
|
"start_of_week": {
|
|
"type": "integer",
|
|
"description": "A day number of the week that the week should start on."
|
|
},
|
|
"language": { "type": "string", "description": "WordPress locale code." },
|
|
"use_smilies": {
|
|
"type": "boolean",
|
|
"description": "Convert emoticons like :-) and :-P to graphics on display."
|
|
},
|
|
"default_category": { "type": "integer", "description": "Default post category." },
|
|
"default_post_format": { "type": "string", "description": "Default post format." },
|
|
"posts_per_page": { "type": "integer", "description": "Blog pages show at most." },
|
|
"show_on_front": { "type": "string", "description": "What to show on the front page" },
|
|
"page_on_front": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should be displayed on the front page"
|
|
},
|
|
"page_for_posts": {
|
|
"type": "integer",
|
|
"description": "The ID of the page that should display the latest posts"
|
|
},
|
|
"default_ping_status": {
|
|
"type": "string",
|
|
"description": "Allow link notifications from other blogs (pingbacks and trackbacks) on new articles."
|
|
},
|
|
"default_comment_status": {
|
|
"type": "string",
|
|
"description": "Allow people to submit comments on new posts."
|
|
},
|
|
"site_logo": { "type": "integer", "description": "Site logo." },
|
|
"site_icon": { "type": "integer", "description": "Site icon." },
|
|
"pickup_location_settings": {
|
|
"type": "object",
|
|
"description": "WooCommerce Local Pickup Method Settings"
|
|
},
|
|
"pickup_locations": { "type": "array", "description": "WooCommerce Local Pickup Locations" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/themes": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/theme" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limit result set to themes assigned one or more statuses.",
|
|
"required": false,
|
|
"schema": { "items": { "enum": ["active", "inactive"], "type": "string" } }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/themes/{stylesheet}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/theme" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "stylesheet",
|
|
"in": "path",
|
|
"description": "The theme's style sheet. This uniquely identifies the theme.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/plugins": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Limits results to plugins with the given status.",
|
|
"required": false,
|
|
"schema": { "items": { "type": "string", "enum": ["inactive", "active"] } }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": { "type": "string", "required": true, "description": "WordPress.org plugin directory slug." },
|
|
"status": { "type": "string", "description": "The plugin activation status." }
|
|
},
|
|
"required": ["slug"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/plugins/{plugin}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "plugin", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "plugin", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"status": { "type": "string", "description": "The plugin activation status." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "plugin", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"status": { "type": "string", "description": "The plugin activation status." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "plugin", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
},
|
|
"status": { "type": "string", "description": "The plugin activation status." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/plugin" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "plugin", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"context": {
|
|
"type": "string",
|
|
"description": "Scope under which the request is made; determines fields present in response."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/sidebars": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sidebar" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/sidebars/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sidebar" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "The ID of a registered sidebar",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sidebar" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "widgets": { "type": "array", "description": "Nested widgets." } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sidebar" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "widgets": { "type": "array", "description": "Nested widgets." } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/sidebar" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "widgets": { "type": "array", "description": "Nested widgets." } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/widget-types": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget-type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/widget-types/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget-type" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The widget type ID.", "required": true, "schema": {} },
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/widget-types/{id}/encode": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The widget type ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"instance": { "type": "object", "description": "Current instance settings of the widget." },
|
|
"form_data": {
|
|
"type": "string",
|
|
"description": "Serialised widget form data to encode into instance settings."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/widget-types/{id}/render": {
|
|
"post": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "id", "in": "path", "description": "The widget type ID.", "required": true, "schema": {} }
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"instance": { "type": "object", "description": "Current instance settings of the widget." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/widgets": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "sidebar",
|
|
"in": "query",
|
|
"description": "The sidebar for which to return widgets.",
|
|
"required": false,
|
|
"schema": {}
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string", "description": "Unique identifier for the widget." },
|
|
"id_base": {
|
|
"type": "string",
|
|
"description": "The type of the widget. Corresponds to ID in widget-types endpoint."
|
|
},
|
|
"sidebar": {
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "The sidebar to which the widget belongs."
|
|
},
|
|
"instance": { "type": "object", "description": "Instance settings of the widget, if supported." },
|
|
"form_data": {
|
|
"type": "string",
|
|
"description": "URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only."
|
|
}
|
|
},
|
|
"required": ["sidebar"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/widgets/{id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the widget.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id_base": {
|
|
"type": "string",
|
|
"description": "The type of the widget. Corresponds to ID in widget-types endpoint."
|
|
},
|
|
"sidebar": { "type": "string", "description": "The sidebar to which the widget belongs." },
|
|
"instance": { "type": "object", "description": "Instance settings of the widget, if supported." },
|
|
"form_data": {
|
|
"type": "string",
|
|
"description": "URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the widget.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id_base": {
|
|
"type": "string",
|
|
"description": "The type of the widget. Corresponds to ID in widget-types endpoint."
|
|
},
|
|
"sidebar": { "type": "string", "description": "The sidebar to which the widget belongs." },
|
|
"instance": { "type": "object", "description": "Instance settings of the widget, if supported." },
|
|
"form_data": {
|
|
"type": "string",
|
|
"description": "URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Unique identifier for the widget.",
|
|
"required": true,
|
|
"schema": {}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id_base": {
|
|
"type": "string",
|
|
"description": "The type of the widget. Corresponds to ID in widget-types endpoint."
|
|
},
|
|
"sidebar": { "type": "string", "description": "The sidebar to which the widget belongs." },
|
|
"instance": { "type": "object", "description": "Instance settings of the widget, if supported." },
|
|
"form_data": {
|
|
"type": "string",
|
|
"description": "URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/widget" } } }
|
|
}
|
|
},
|
|
"parameters": [{ "name": "id", "in": "path", "description": "", "required": true, "schema": {} }],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"force": {
|
|
"type": "boolean",
|
|
"description": "Whether to force removal of the widget, or move it to the inactive sidebar."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/block-directory/search": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/block-directory-item" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "term",
|
|
"in": "query",
|
|
"description": "Limit result set to blocks matching the search term.",
|
|
"required": true,
|
|
"schema": { "minLength": 1 }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/pattern-directory/patterns": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/pattern-directory-item" } }
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a string.",
|
|
"required": false,
|
|
"schema": { "minLength": 1 }
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a category ID.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "keyword",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a keyword ID.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"in": "query",
|
|
"description": "Limit results to those matching a pattern (slug).",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Offset the result set by a specific number of items.",
|
|
"required": false,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "order",
|
|
"in": "query",
|
|
"description": "Order sort attribute ascending or descending.",
|
|
"required": false,
|
|
"schema": { "enum": ["asc", "desc"] }
|
|
},
|
|
{
|
|
"name": "orderby",
|
|
"in": "query",
|
|
"description": "Sort collection by post attribute.",
|
|
"required": false,
|
|
"schema": {
|
|
"enum": [
|
|
"author",
|
|
"date",
|
|
"id",
|
|
"include",
|
|
"modified",
|
|
"parent",
|
|
"relevance",
|
|
"slug",
|
|
"include_slugs",
|
|
"title",
|
|
"favorite_count"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/block-patterns/patterns": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/block-pattern" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/block-patterns/categories": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/block-pattern-category" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp/v2/menu-locations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/menu-location" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/menu-locations/{location}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/menu-location" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "location",
|
|
"in": "path",
|
|
"description": "An alphanumeric identifier for the menu location.",
|
|
"required": true,
|
|
"schema": {}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/font-collections": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/font-collection" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Current page of the collection.",
|
|
"required": false,
|
|
"schema": { "minimum": 1 }
|
|
},
|
|
{
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"description": "Maximum number of items to be returned in result set.",
|
|
"required": false,
|
|
"schema": { "minimum": 1, "maximum": 100 }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp/v2/font-collections/{slug}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/font-collection" } } }
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Scope under which the request is made; determines fields present in response.",
|
|
"required": false,
|
|
"schema": { "enum": ["view", "embed", "edit"] }
|
|
},
|
|
{ "name": "slug", "in": "path", "description": "", "required": true, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp-site-health/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp-site-health/v1/tests/background-updates": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp-site-health-test" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp-site-health/v1/tests/loopback-requests": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp-site-health-test" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp-site-health/v1/tests/https-status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp-site-health-test" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp-site-health/v1/tests/dotorg-communication": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp-site-health-test" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp-site-health/v1/tests/authorization-header": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/wp-site-health-test" } } }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/wp-site-health/v1/directory-sizes": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wp-site-health/v1/tests/page-cache": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wp-block-editor/v1": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{ "name": "namespace", "in": "query", "description": "", "required": false, "schema": {} },
|
|
{ "name": "context", "in": "query", "description": "", "required": false, "schema": {} }
|
|
]
|
|
}
|
|
},
|
|
"/wp-block-editor/v1/url-details": {
|
|
"get": {
|
|
"responses": { "200": { "description": "OK" } },
|
|
"parameters": [
|
|
{
|
|
"name": "url",
|
|
"in": "query",
|
|
"description": "The URL to process.",
|
|
"required": true,
|
|
"schema": { "format": "uri" }
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/wp-block-editor/v1/export": { "get": { "responses": { "200": { "description": "OK" } } } },
|
|
"/wp-block-editor/v1/navigation-fallback": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/navigation-fallback" } } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|