Skip to content

Instantly share code, notes, and snippets.

@numpde
Created October 14, 2024 05:15
Show Gist options
  • Save numpde/b1314e0457913df751dda43851ad44fb to your computer and use it in GitHub Desktop.
Save numpde/b1314e0457913df751dda43851ad44fb to your computer and use it in GitHub Desktop.
OpenAPI for the WP/WC (by Schneider & Schuetz GmbH)
components:
schemas:
WPError:
properties:
additional_data:
description: Additional data of the error
type: any
additional_errors:
description: More errors
items:
$ref: '#/components/schemas/WPError'
type: array
code:
description: The error code
type: string
data:
description: Data of the error
type: any
message:
description: The description of the error
type: string
type: object
batch:
properties:
create:
description: List of created resources.
items:
type: object
type: array
delete:
description: List of delete resources.
items:
type: integer
type: array
update:
description: List of updated resources.
items:
type: object
type: array
type: object
customer:
properties:
avatar_url:
description: Avatar URL.
type: string
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
date_created:
description: The date the customer was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the customer was created, as GMT.
type: date-time
date_modified:
description: The date the customer was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the customer was last modified, as GMT.
type: date-time
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
id:
description: Unique identifier for the resource.
type: integer
is_paying_customer:
description: Is the customer a paying customer?
type: bool
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
password:
description: Customer password.
type: string
role:
description: Customer role.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
type: object
customer_download:
properties:
access_expires:
description: The date when download access expires, in the site's timezone.
type: string
access_expires_gmt:
description: The date when download access expires, as GMT.
type: string
download_id:
description: Download ID.
type: string
download_name:
description: Downloadable file name.
type: string
download_url:
description: Download file URL.
type: string
downloads_remaining:
description: Number of downloads remaining.
type: string
file:
description: File details.
properties:
file:
description: File URL.
type: string
name:
description: File name.
type: string
type: object
order_id:
description: Order ID.
type: integer
order_key:
description: Order key.
type: string
product_id:
description: Downloadable product ID.
type: integer
product_name:
description: Product name.
type: string
type: object
data_continents:
properties:
code:
description: 2 character continent code.
type: string
countries:
description: List of countries on this continent.
items:
properties:
code:
description: ISO3166 alpha-2 country code.
type: string
currency_code:
description: Default ISO4127 alpha-3 currency code for the country.
type: string
currency_pos:
description: Currency symbol position for this country.
type: string
decimal_sep:
description: Decimal separator for displayed prices for this country.
type: string
dimension_unit:
description: The unit lengths are defined in for this country.
type: string
name:
description: Full name of country.
type: string
num_decimals:
description: Number of decimal points shown in displayed prices for
this country.
type: integer
states:
description: List of states in this country.
items:
properties:
code:
description: State code.
type: string
name:
description: Full name of state.
type: string
type: object
type: array
thousand_sep:
description: Thousands separator for displayed prices in this country.
type: string
weight_unit:
description: The unit weights are defined in for this country.
type: string
type: object
type: array
name:
description: Full name of continent.
type: string
type: object
data_countries:
properties:
code:
description: ISO3166 alpha-2 country code.
type: string
name:
description: Full name of country.
type: string
states:
description: List of states in this country.
items:
properties:
code:
description: State code.
type: string
name:
description: Full name of state.
type: string
type: object
type: array
type: object
data_currencies:
properties:
code:
description: ISO4217 currency code.
type: string
name:
description: Full name of currency.
type: string
symbol:
description: Currency symbol.
type: string
type: object
data_index:
properties:
description:
description: Data resource description.
type: string
slug:
description: Data resource ID.
type: string
type: object
order_note:
properties:
added_by_user:
description: If true, this note will be attributed to the current user.
If false, the note will be attributed to the system.
type: boolean
author:
description: Order note author.
type: string
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
date_created:
description: The date the order note was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the order note was created, as GMT.
type: date-time
id:
description: Unique identifier for the resource.
type: integer
note:
description: Order note content.
type: string
type: object
payment_gateway:
properties:
description:
description: Payment gateway description on checkout.
type: string
enabled:
description: Payment gateway enabled status.
type: boolean
id:
description: Payment gateway ID.
type: string
method_description:
description: Payment gateway method description.
type: string
method_supports:
description: Supported features for this payment gateway.
items:
type: string
type: array
method_title:
description: Payment gateway method title.
type: string
order:
description: Payment gateway sort order.
type: integer
settings:
description: Payment gateway settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
type: string
value:
description: Setting value.
type: string
type: object
title:
description: Payment gateway title on checkout.
type: string
type: object
product:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
average_rating:
description: Reviews average rating.
type: string
backordered:
description: Shows if the product is on backordered.
type: boolean
backorders:
description: If managing stock, this controls if backorders are allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
backorders_allowed:
description: Shows if backorders are allowed.
type: boolean
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the product was created, as GMT.
type: date-time
date_modified:
description: The date the product was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the product was last modified, as GMT.
type: date-time
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type: date-time
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type: date-time
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type: date-time
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type: date-time
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded after
purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
generated_slug:
description: Slug automatically generated from the product name.
type: string
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
grouped_products:
description: List of grouped products ID.
items:
type: integer
type: array
has_options:
description: Shows if the product needs to be configured before it can be
bought.
type: boolean
id:
description: Unique identifier for the resource.
type: integer
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the image was created, as GMT.
type: date-time
date_modified:
description: The date the image was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the image was last modified, as GMT.
type: date-time
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
name:
description: Product name.
type: string
on_sale:
description: Shows if the product is on sale.
type: boolean
parent_id:
description: Product parent ID.
type: integer
permalink:
description: Product URL.
format: uri
type: string
permalink_template:
description: Permalink template for the product.
type: string
post_password:
description: Post password.
type: string
price:
description: Current product price.
type: string
price_html:
description: Price formatted in HTML.
type: string
purchasable:
description: Shows if the product can be bought.
type: boolean
purchase_note:
description: Optional note to send the customer after purchase.
type: string
rating_count:
description: Amount of reviews that the product have.
type: integer
regular_price:
description: Product regular price.
type: string
related_ids:
description: List of related products IDs.
items:
type: integer
type: array
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
shipping_class_id:
description: Shipping class ID.
type: string
shipping_required:
description: Shows if the product need to be shipped.
type: boolean
shipping_taxable:
description: Shows whether or not the product shipping is taxable.
type: boolean
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
total_sales:
description: Amount of sales.
type: integer
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
variations:
description: List of variations IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
type: object
product_attribute:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
id:
description: Unique identifier for the resource.
type: integer
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
type: object
product_attribute_term:
properties:
count:
description: Number of published products for the resource.
type: integer
description:
description: HTML description of the resource.
type: string
id:
description: Unique identifier for the resource.
type: integer
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique to its type.
type: string
type: object
product_cat:
properties:
count:
description: Number of published products for the resource.
type: integer
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
id:
description: Unique identifier for the resource.
type: integer
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the image was created, as GMT.
type: date-time
date_modified:
description: The date the image was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the image was last modified, as GMT.
type: date-time
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique to its type.
type: string
type: object
product_review:
properties:
date_created:
description: The date the review was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the review was created, as GMT.
type: date-time
id:
description: Unique identifier for the resource.
type: integer
product_id:
description: Unique identifier for the product that the review belongs to.
type: integer
product_name:
description: Product name.
type: string
product_permalink:
description: Product URL.
format: uri
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_avatar_urls:
description: Avatar URLs for the object reviewer.
properties:
'24':
description: Avatar URL with image size of 24 pixels.
format: uri
type: string
'48':
description: Avatar URL with image size of 48 pixels.
format: uri
type: string
'96':
description: Avatar URL with image size of 96 pixels.
format: uri
type: string
type: object
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
verified:
description: Shows if the reviewer bought the product or not.
type: boolean
type: object
product_shipping_class:
properties:
count:
description: Number of published products for the resource.
type: integer
description:
description: HTML description of the resource.
type: string
id:
description: Unique identifier for the resource.
type: integer
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique to its type.
type: string
type: object
product_tag:
properties:
count:
description: Number of published products for the resource.
type: integer
description:
description: HTML description of the resource.
type: string
id:
description: Unique identifier for the resource.
type: integer
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique to its type.
type: string
type: object
product_variation:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backordered:
description: Shows if the variation is on backordered.
type: boolean
backorders:
description: If managing stock, this controls if backorders are allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
backorders_allowed:
description: Shows if backorders are allowed.
type: boolean
date_created:
description: The date the variation was created, in the site's timezone.
type: date-time
date_modified:
description: The date the variation was last modified, in the site's timezone.
type: date-time
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type: date-time
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type: date-time
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type: date-time
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type: date-time
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded after
purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
id:
description: Unique identifier for the resource.
type: integer
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the image was created, as GMT.
type: date-time
date_modified:
description: The date the image was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the image was last modified, as GMT.
type: date-time
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
on_sale:
description: Shows if the variation is on sale.
type: boolean
permalink:
description: Variation URL.
format: uri
type: string
price:
description: Current variation price.
type: string
purchasable:
description: Shows if the variation can be bought.
type: boolean
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
shipping_class_id:
description: Shipping class ID.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
type: object
report:
properties:
description:
description: A human-readable description of the resource.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
type: object
report_coupon_total:
properties:
name:
description: Coupon type name.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
total:
description: Amount of coupons.
type: string
type: object
report_customer_total:
properties:
name:
description: Customer type name.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
total:
description: Amount of customers.
type: string
type: object
report_order_total:
properties:
name:
description: Order status name.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
total:
description: Amount of orders.
type: string
type: object
report_product_total:
properties:
name:
description: Product type name.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
total:
description: Amount of products.
type: string
type: object
report_review_total:
properties:
name:
description: Review type name.
type: string
slug:
description: An alphanumeric identifier for the resource.
type: string
total:
description: Amount of reviews.
type: string
type: object
sales_report:
properties:
average_sales:
description: Average net daily sales.
type: string
net_sales:
description: Net sales in the period.
type: string
total_discount:
description: Total of coupons used.
type: integer
total_items:
description: Total of items purchased.
type: integer
total_orders:
description: Total of orders placed.
type: integer
total_refunds:
description: Total of refunded orders.
type: integer
total_sales:
description: Gross sales in the period.
type: string
total_shipping:
description: Total charged for shipping.
type: string
total_tax:
description: Total charged for taxes.
type: string
totals:
description: Totals.
items:
type: array
type: array
totals_grouped_by:
description: Group type.
type: string
type: object
setting:
properties:
default:
description: Default value for the setting.
type: mixed
description:
description: A human readable description for the setting used in interfaces.
type: string
group_id:
description: An identifier for the group this setting belongs to.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in interfaces.
type: string
options:
description: Array of options (key value pairs) for inputs such as select,
multiselect, and radio buttons.
type: object
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
type: string
value:
description: Setting value.
type: mixed
type: object
setting_group:
properties:
description:
description: A human readable description for the setting used in interfaces.
type: string
id:
description: A unique identifier that can be used to link settings together.
type: string
label:
description: A human readable label for the setting used in interfaces.
type: string
parent_id:
description: ID of parent grouping.
type: string
sub_groups:
description: IDs for settings sub groups.
type: string
type: object
shipping_method:
properties:
description:
description: Shipping method description.
type: string
id:
description: Method ID.
type: string
title:
description: Shipping method title.
type: string
type: object
shipping_zone:
properties:
id:
description: Unique identifier for the resource.
type: integer
name:
description: Shipping zone name.
type: string
order:
description: Shipping zone order.
type: integer
type: object
shipping_zone_location:
properties:
code:
description: Shipping zone location code.
type: string
type:
description: Shipping zone location type.
enum:
- postcode
- state
- country
- continent
type: string
type: object
shipping_zone_method:
properties:
enabled:
description: Shipping method enabled status.
type: boolean
id:
description: Shipping method instance ID.
type: integer
instance_id:
description: Shipping method instance ID.
type: integer
method_description:
description: Shipping method description.
type: string
method_id:
description: Shipping method ID.
type: string
method_title:
description: Shipping method title.
type: string
order:
description: Shipping method sort order.
type: integer
settings:
description: Shipping method settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
- class
- order
type: string
value:
description: Setting value.
type: string
type: object
title:
description: Shipping method customer facing title.
type: string
type: object
shop_coupon:
properties:
amount:
description: The amount of discount. Should always be numeric, even if setting
a percentage.
type: string
code:
description: Coupon code.
type: string
date_created:
description: The date the coupon was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the coupon was created, as GMT.
type: date-time
date_expires:
description: The date the coupon expires, in the site's timezone.
type: date-time
date_expires_gmt:
description: The date the coupon expires, as GMT.
type: date-time
date_modified:
description: The date the coupon was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the coupon was last modified, as GMT.
type: date-time
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that have
sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a coupon,
this coupon will enable free shipping.
type: boolean
id:
description: Unique identifier for the object.
type: integer
individual_use:
description: If true, the coupon can only be used individually. Other applied
coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before coupon
applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_count:
description: Number of times the coupon has been used already.
type: integer
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
used_by:
description: List of user IDs (or guest email addresses) that have used
the coupon.
items:
type: integer
type: array
type: object
shop_order:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
cart_hash:
description: MD5 hash of cart items to ensure orders are not modified.
type: string
cart_tax:
description: Sum of line item taxes only.
type: string
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type: mixed
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute value
or a percent, depending on the discount type).
type: number
type: object
type: array
created_via:
description: Shows where the order was created.
type: string
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_ip_address:
description: Customer's IP address.
type: string
customer_note:
description: Note left by customer during checkout.
type: string
customer_user_agent:
description: User agent of the customer.
type: string
date_completed:
description: The date the order was completed, in the site's timezone.
type: date-time
date_completed_gmt:
description: The date the order was completed, as GMT.
type: date-time
date_created:
description: The date the order was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the order was created, as GMT.
type: date-time
date_modified:
description: The date the order was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the order was last modified, as GMT.
type: date-time
date_paid:
description: The date the order was paid, in the site's timezone.
type: date-time
date_paid_gmt:
description: The date the order was paid, as GMT.
type: date-time
discount_tax:
description: Total discount tax amount for the order.
type: string
discount_total:
description: Total discount amount for the order.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
name:
description: Fee name.
type: mixed
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
id:
description: Unique identifier for the resource.
type: integer
is_editable:
description: Whether an order can be edited.
type: boolean
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
name:
description: Product name.
type: mixed
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type: mixed
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers as
"added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
needs_payment:
description: Whether an order needs payment, based on status and order total.
type: boolean
needs_processing:
description: Whether an order needs processing before it can be completed.
type: boolean
number:
description: Order number.
type: string
order_key:
description: Order key.
type: string
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
payment_url:
description: Order payment URL.
type: string
prices_include_tax:
description: True the prices included tax during checkout.
type: boolean
refunds:
description: List of refunds.
items:
properties:
id:
description: Refund ID.
type: integer
reason:
description: Refund reason.
type: string
total:
description: Refund total.
type: string
type: object
type: array
set_paid:
description: Define if the order is paid. It will set the status to processing
and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
method_id:
description: Shipping method ID.
type: mixed
method_title:
description: Shipping method name.
type: mixed
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
shipping_tax:
description: Total shipping tax amount for the order.
type: string
shipping_total:
description: Total shipping amount for the order.
type: string
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
tax_lines:
description: Tax lines data.
items:
properties:
compound:
description: Show if is a compound tax rate.
type: boolean
id:
description: Item ID.
type: integer
label:
description: Tax rate label.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
rate_code:
description: Tax rate code.
type: string
rate_id:
description: Tax rate ID.
type: integer
shipping_tax_total:
description: Shipping tax total.
type: string
tax_total:
description: Tax total (not including shipping taxes).
type: string
type: object
type: array
total:
description: Grand total.
type: string
total_tax:
description: Sum of all taxes.
type: string
transaction_id:
description: Unique transaction ID.
type: string
version:
description: Version of WooCommerce which last updated the order.
type: string
type: object
shop_order_refund:
properties:
amount:
description: Refund amount.
type: string
api_refund:
description: When true, the payment gateway API is used to generate the
refund.
type: boolean
api_restock:
description: When true, refunded items are restocked.
type: boolean
date_created:
description: The date the order refund was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the order refund was created, as GMT.
type: date-time
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
name:
description: Fee name.
type: mixed
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
id:
description: Unique identifier for the resource.
type: integer
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
name:
description: Product name.
type: mixed
price:
description: Product price.
type: number
product_id:
description: Product ID.
type: mixed
quantity:
description: Quantity ordered.
type: integer
refund_total:
description: Amount that will be refunded for this line item (excluding
taxes).
type: number
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
refund_total:
description: Amount that will be refunded for this tax.
type: number
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
reason:
description: Reason for refund.
type: string
refunded_by:
description: User ID of user who created the refund.
type: integer
refunded_payment:
description: If the payment was refunded via the API.
type: boolean
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
method_id:
description: Shipping method ID.
type: mixed
method_title:
description: Shipping method name.
type: mixed
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
tax_lines:
description: Tax lines data.
items:
properties:
compound:
description: Show if is a compound tax rate.
type: boolean
id:
description: Item ID.
type: integer
label:
description: Tax rate label.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type: mixed
type: object
type: array
rate_code:
description: Tax rate code.
type: string
rate_id:
description: Tax rate ID.
type: integer
shipping_tax_total:
description: Shipping tax total.
type: string
tax_total:
description: Tax total (not including shipping taxes).
type: string
type: object
type: array
type: object
system_status:
properties:
active_plugins:
description: Active plugins.
items:
type: string
type: array
database:
description: Database.
properties:
database_prefix:
description: Database prefix.
type: string
database_tables:
description: Database tables.
items:
type: string
type: array
maxmind_geoip_database:
description: MaxMind GeoIP database.
type: string
wc_database_version:
description: WC database version.
type: string
type: object
dropins_mu_plugins:
description: Dropins & MU plugins.
items:
type: string
type: array
environment:
description: Environment.
properties:
curl_version:
description: cURL version.
type: string
default_timezone:
description: Default timezone.
type: string
domdocument_enabled:
description: Is DomDocument class enabled?
type: boolean
fsockopen_or_curl_enabled:
description: Is fsockopen/cURL enabled?
type: boolean
gzip_enabled:
description: Is GZip enabled?
type: boolean
home_url:
description: Home URL.
format: uri
type: string
language:
description: WordPress language.
type: string
log_directory:
description: Log directory.
type: string
log_directory_writable:
description: Is log directory writable?
type: boolean
max_upload_size:
description: Max upload size.
type: integer
mbstring_enabled:
description: Is mbstring enabled?
type: boolean
mysql_version:
description: MySQL version.
type: string
mysql_version_string:
description: MySQL version string.
type: string
php_max_execution_time:
description: PHP max execution time.
type: integer
php_max_input_vars:
description: PHP max input vars.
type: integer
php_post_max_size:
description: PHP post max size.
type: integer
php_version:
description: PHP version.
type: string
remote_get_response:
description: Remote GET response.
type: string
remote_get_successful:
description: Remote GET successful?
type: boolean
remote_post_response:
description: Remote POST response.
type: string
remote_post_successful:
description: Remote POST successful?
type: boolean
server_info:
description: Server info.
type: string
site_url:
description: Site URL.
format: uri
type: string
soapclient_enabled:
description: Is SoapClient class enabled?
type: boolean
store_id:
description: WooCommerce Store Identifier.
type: string
suhosin_installed:
description: Is SUHOSIN installed?
type: boolean
version:
description: WooCommerce version.
type: string
wp_cron:
description: Are WordPress cron jobs enabled?
type: boolean
wp_debug_mode:
description: Is WordPress debug mode active?
type: boolean
wp_memory_limit:
description: WordPress memory limit.
type: integer
wp_multisite:
description: Is WordPress multisite?
type: boolean
wp_version:
description: WordPress version.
type: string
type: object
inactive_plugins:
description: Inactive plugins.
items:
type: string
type: array
logging:
description: Logging.
properties:
default_handler:
description: The logging handler class.
type: string
level_threshold:
description: Minimum severity level.
type: string
log_directory_size:
description: The size of the log directory.
type: string
logging_enabled:
description: Is logging enabled?
type: boolean
retention_period_days:
description: The number of days log entries are retained.
type: integer
type: object
pages:
description: WooCommerce pages.
items:
type: string
type: array
post_type_counts:
description: Total post count.
items:
type: string
type: array
security:
description: Security.
properties:
hide_errors:
description: Hide errors from visitors?
type: boolean
secure_connection:
description: Is the connection to your store secure?
type: boolean
type: object
settings:
description: Settings.
properties:
HPOS_enabled:
description: Is HPOS enabled?
type: boolean
HPOS_sync_enabled:
description: Is HPOS sync enabled?
type: boolean
api_enabled:
description: Legacy REST API enabled?
type: boolean
currency:
description: Currency.
type: string
currency_position:
description: Currency position.
type: string
currency_symbol:
description: Currency symbol.
type: string
decimal_separator:
description: Decimal separator.
type: string
enforce_approved_download_dirs:
description: Enforce approved download directories?
type: boolean
force_ssl:
description: SSL forced?
type: boolean
geolocation_enabled:
description: Geolocation enabled?
type: boolean
number_of_decimals:
description: Number of decimals.
type: integer
order_datastore:
description: Order datastore.
type: string
product_visibility_terms:
description: Terms in the product visibility taxonomy.
items:
type: string
type: array
taxonomies:
description: Taxonomy terms for product/order statuses.
items:
type: string
type: array
thousand_separator:
description: Thousand separator.
type: string
wccom_connected:
description: Is store connected to WooCommerce.com?
type: string
type: object
theme:
description: Theme.
properties:
author_url:
description: Theme author URL.
format: uri
type: string
has_outdated_templates:
description: Does this theme have outdated templates?
type: boolean
has_woocommerce_file:
description: Does the theme have a woocommerce.php file?
type: boolean
has_woocommerce_support:
description: Does the theme declare WooCommerce support?
type: boolean
is_child_theme:
description: Is this theme a child theme?
type: boolean
name:
description: Theme name.
type: string
overrides:
description: Template overrides.
items:
type: string
type: array
parent_author_url:
description: Parent theme author URL.
format: uri
type: string
parent_name:
description: Parent theme name.
type: string
parent_version:
description: Parent theme version.
type: string
version:
description: Theme version.
type: string
version_latest:
description: Latest version of theme.
type: string
type: object
type: object
system_status_tool:
properties:
action:
description: What running the tool will do.
type: string
description:
description: Tool description.
type: string
id:
description: A unique identifier for the tool.
type: string
message:
description: Tool return message.
type: string
name:
description: Tool name.
type: string
success:
description: Did the tool run successfully?
type: boolean
type: object
tax:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated as
of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
id:
description: Unique identifier for the resource.
type: integer
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce 5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
type: object
tax_class:
properties:
name:
description: Tax class name.
type: string
slug:
description: Unique identifier for the resource.
type: string
required:
- name
type: object
top_sellers_report:
properties:
name:
description: Product name.
type: string
product_id:
description: Product ID.
type: integer
quantity:
description: Total number of purchases.
type: integer
type: object
webhook:
properties:
date_created:
description: The date the webhook was created, in the site's timezone.
type: date-time
date_created_gmt:
description: The date the webhook was created, as GMT.
type: date-time
date_modified:
description: The date the webhook was last modified, in the site's timezone.
type: date-time
date_modified_gmt:
description: The date the webhook was last modified, as GMT.
type: date-time
delivery_url:
description: The URL where the webhook payload is delivered.
format: uri
type: string
event:
description: Webhook event.
type: string
hooks:
description: WooCommerce action names associated with the webhook.
items:
type: string
type: array
id:
description: Unique identifier for the resource.
type: integer
name:
description: A friendly name for the webhook.
type: string
resource:
description: Webhook resource.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
type: object
info:
summary: ********************************************
title: wc/v3
version: '1'
jsonSchemaDialect: http://json-schema.org/draft-04/schema#
openapi: 3.1.0
paths:
/:
get:
parameters:
- description: ''
in: query
name: namespace
required: false
schema:
type: string
- description: ''
in: query
name: context
required: false
schema:
type: string
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/coupons:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
type: string
- description: Limit result set to resources with a specific code.
in: query
name: code
required: false
schema:
description: Limit result set to resources with a specific code.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: shop_coupon
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/coupons/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/coupons/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: shop_coupon
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: shop_coupon
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
amount:
description: The amount of discount. Should always be numeric, even
if setting a percentage.
type: string
code:
description: Coupon code.
type: string
date_expires:
description: The date the coupon expires, in the site's timezone.
type:
- 'null'
- string
date_expires_gmt:
description: The date the coupon expires, as GMT.
type:
- 'null'
- string
description:
description: Coupon description.
type: string
discount_type:
description: Determines the type of discount that will be applied.
enum:
- percent
- fixed_cart
- fixed_product
type: string
email_restrictions:
description: List of email addresses that can use this coupon.
items:
type: string
type: array
exclude_sale_items:
description: If true, this coupon will not be applied to items that
have sale prices.
type: boolean
excluded_product_categories:
description: List of category IDs the coupon does not apply to.
items:
type: integer
type: array
excluded_product_ids:
description: List of product IDs the coupon cannot be used on.
items:
type: integer
type: array
free_shipping:
description: If true and if the free shipping method requires a
coupon, this coupon will enable free shipping.
type: boolean
individual_use:
description: If true, the coupon can only be used individually.
Other applied coupons will be removed from the cart.
type: boolean
limit_usage_to_x_items:
description: Max number of items in the cart the coupon can be applied
to.
type: integer
maximum_amount:
description: Maximum order amount allowed when using the coupon.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
minimum_amount:
description: Minimum order amount that needs to be in the cart before
coupon applies.
type: string
product_categories:
description: List of category IDs the coupon applies to.
items:
type: integer
type: array
product_ids:
description: List of product IDs the coupon can be used on.
items:
type: integer
type: array
status:
description: The status of the coupon. Should always be draft, published,
or pending review
type: string
usage_limit:
description: How many times the coupon can be used in total.
type: integer
usage_limit_per_user:
description: How many times the coupon can be used per customer.
type: integer
title: shop_coupon
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_coupon'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/customers:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific IDs.
in: query
name: include
required: false
schema:
description: Limit result set to specific IDs.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- id
- include
- name
- registered_date
type: string
- description: Limit result set to resources with a specific email.
in: query
name: email
required: false
schema:
description: Limit result set to resources with a specific email.
format: email
type: string
- description: Limit result set to resources with a specific role.
in: query
name: role
required: false
schema:
description: Limit result set to resources with a specific role.
enum:
- all
- administrator
- editor
- author
- contributor
- subscriber
- customer
- shop_manager
- wcfm_vendor
- disable_vendor
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: New user email address.
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: New user password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: New user username.
type: string
title: customer
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/customers/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/customers/{customer_id}/downloads:
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: customer_id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer_download'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/customers/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
- description: ID to reassign posts to.
in: query
name: reassign
required: false
schema:
description: ID to reassign posts to.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: customer
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: customer
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: List of billing address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
email:
description: Email address.
format: email
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
email:
description: The email address for the customer.
format: email
type: string
first_name:
description: Customer first name.
type: string
last_name:
description: Customer last name.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
password:
description: Customer password.
type: string
shipping:
description: List of shipping address data.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: ISO code of the country.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
username:
description: Customer login name.
type: string
title: customer
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/customer'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_index'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/continents:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_continents'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/continents/{location}:
get:
parameters:
- description: 2 character continent code.
in: query
name: continent
required: false
schema:
description: 2 character continent code.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_continents'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/countries:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_countries'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/countries/{location}:
get:
parameters:
- description: ISO3166 alpha-2 country code.
in: path
name: location
required: true
schema:
description: ISO3166 alpha-2 country code.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_countries'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/currencies:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_currencies'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/currencies/current:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_currencies'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/data/currencies/{currency}:
get:
parameters:
- description: ISO4217 currency code.
in: query
name: location
required: false
schema:
description: ISO4217 currency code.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/data_currencies'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/layout-templates:
get:
parameters:
- description: Area to get templates for.
in: query
name: area
required: false
schema:
description: Area to get templates for.
type: string
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/layout-templates/{id}:
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/create-order:
post:
requestBody:
content:
application/json:
schema:
properties:
product_id:
type: string
title: marketplace
type: object
required: true
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/featured:
get:
parameters: []
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/refresh:
post:
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/subscriptions:
get:
parameters: []
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/subscriptions/activate:
post:
requestBody:
content:
application/json:
schema:
properties:
product_key:
type: string
title: activate
type: object
required: true
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/subscriptions/connect:
post:
requestBody:
content:
application/json:
schema:
properties:
product_key:
type: string
title: connect
type: object
required: true
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/subscriptions/disconnect:
post:
requestBody:
content:
application/json:
schema:
properties:
product_key:
type: string
title: disconnect
type: object
required: true
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/marketplace/subscriptions/install-url:
get:
parameters:
- description: ''
in: query
name: product_key
required: true
schema:
type: string
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Limit result set to orders which have specific statuses.
in: query
name: status
required: false
schema:
description: Limit result set to orders which have specific statuses.
items:
enum:
- any
- trash
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
type: array
- description: Limit result set to orders assigned a specific customer.
in: query
name: customer
required: false
schema:
description: Limit result set to orders assigned a specific customer.
type: integer
- description: Limit result set to orders assigned a specific product.
in: query
name: product
required: false
schema:
description: Limit result set to orders assigned a specific product.
type: integer
- description: Number of decimal points to use in each resource.
in: query
name: dp
required: false
schema:
description: Number of decimal points to use in each resource.
type: integer
- description: Only show meta which is meant to be displayed for an order.
in: query
name: order_item_display_meta
required: false
schema:
description: Only show meta which is meant to be displayed for an order.
type: boolean
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: shop_order
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: shop_order
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: shop_order
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
billing:
description: Billing address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
email:
description: Email address.
format: email
type:
- string
- 'null'
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
phone:
description: Phone number.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
coupon_lines:
description: Coupons line data.
items:
properties:
code:
description: Coupon code.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
discount:
description: Discount total.
type: string
discount_tax:
description: Discount total tax.
type: string
discount_type:
description: Discount type.
type: string
free_shipping:
description: Whether the coupon grants free shipping or not.
type: boolean
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
nominal_amount:
description: Discount amount as defined in the coupon (absolute
value or a percent, depending on the discount type).
type: number
type: object
type: array
currency:
description: Currency the order was created with, in ISO format.
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
type: string
customer_id:
description: User ID who owns the order. 0 for guests.
type: integer
customer_note:
description: Note left by customer during checkout.
type: string
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
line_items:
description: Line items data.
items:
properties:
id:
description: Item ID.
type: integer
image:
description: Properties of the main product image.
properties:
id:
description: Image ID.
type: integer
src:
description: Image URL.
format: uri
type: string
type: object
meta_data:
description: Meta data.
items:
properties:
display_key:
description: Meta key for UI display.
type: string
display_value:
description: Meta value for UI display.
type: string
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
parent_name:
description: Parent product name if the product is a variation.
type: string
price:
description: Product price.
type: number
product_id:
description: Product ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
quantity:
description: Quantity ordered.
type: integer
sku:
description: Product SKU.
type: string
subtotal:
description: Line subtotal (before discounts).
type: string
subtotal_tax:
description: Line subtotal tax (before discounts).
type: string
tax_class:
description: Tax class of product.
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
variation_id:
description: Variation ID, if applicable.
type: integer
type: object
type: array
manual_update:
description: Set the action as manual so that the order note registers
as "added by user".
type: boolean
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
parent_id:
description: Parent order ID.
type: integer
payment_method:
description: Payment method ID.
type: string
payment_method_title:
description: Payment method title.
type: string
set_paid:
description: Define if the order is paid. It will set the status
to processing and reduce stock items.
type: boolean
shipping:
description: Shipping address.
properties:
address_1:
description: Address line 1
type: string
address_2:
description: Address line 2
type: string
city:
description: City name.
type: string
company:
description: Company name.
type: string
country:
description: Country code in ISO 3166-1 alpha-2 format.
type: string
first_name:
description: First name.
type: string
last_name:
description: Last name.
type: string
postcode:
description: Postal code.
type: string
state:
description: ISO code or name of the state, province or district.
type: string
type: object
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
status:
description: Order status.
enum:
- auto-draft
- pending
- processing
- on-hold
- completed
- cancelled
- refunded
- failed
- checkout-draft
type: string
transaction_id:
description: Unique transaction ID.
type: string
title: shop_order
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{id}/receipt:
get:
parameters:
- description: Unique identifier of the order.
in: path
name: id
required: true
schema:
description: Unique identifier of the order.
type: integer
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier of the order.
in: path
name: id
required: true
schema:
description: Unique identifier of the order.
type: integer
requestBody:
content:
application/json:
schema:
properties:
expiration_date:
description: Expiration date formatted as yyyy-mm-dd.
type: string
expiration_days:
description: Number of days to be added to the current date to get
the expiration date.
type: integer
force_new:
description: True to force the creation of a new receipt even if
one already exists and has not expired yet.
type: boolean
title: receipt
type: object
required: true
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{order_id}/notes:
get:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Limit result to customers or internal notes.
in: query
name: type
required: false
schema:
description: Limit result to customers or internal notes.
enum:
- any
- customer
- internal
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/order_note'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
requestBody:
content:
application/json:
schema:
properties:
added_by_user:
description: If true, this note will be attributed to the current
user. If false, the note will be attributed to the system.
type: boolean
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
note:
description: Order note content.
type: string
title: order_note
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/order_note'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{order_id}/notes/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/order_note'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/order_note'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{order_id}/refunds:
get:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Number of decimal points to use in each resource.
in: query
name: dp
required: false
schema:
description: Number of decimal points to use in each resource.
type: integer
- description: Only show meta which is meant to be displayed for an order.
in: query
name: order_item_display_meta
required: false
schema:
description: Only show meta which is meant to be displayed for an order.
type: boolean
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order_refund'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
requestBody:
content:
application/json:
schema:
properties:
amount:
description: Refund amount.
type: string
api_refund:
description: When true, the payment gateway API is used to generate
the refund.
type: boolean
api_restock:
description: When true, refunded items are restocked.
type: boolean
fee_lines:
description: Fee lines data.
items:
properties:
id:
description: Item ID.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Fee name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
tax_class:
description: Tax class of fee.
type: string
tax_status:
description: Tax status of fee.
enum:
- taxable
- none
type: string
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
subtotal:
description: Tax subtotal.
type: string
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
reason:
description: Reason for refund.
type: string
refunded_by:
description: User ID of user who created the refund.
type: integer
shipping_lines:
description: Shipping lines data.
items:
properties:
id:
description: Item ID.
type: integer
instance_id:
description: Shipping instance ID.
type: string
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
method_id:
description: Shipping method ID.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
method_title:
description: Shipping method name.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
taxes:
description: Line taxes.
items:
properties:
id:
description: Tax rate ID.
type: integer
total:
description: Tax total.
type: string
type: object
type: array
total:
description: Line total (after discounts).
type: string
total_tax:
description: Line total tax (after discounts).
type: string
type: object
type: array
title: shop_order_refund
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order_refund'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/orders/{order_id}/refunds/{id}:
delete:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order_refund'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: The order ID.
in: path
name: order_id
required: true
schema:
description: The order ID.
type: integer
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order_refund'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/payment_gateways:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/payment_gateway'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/payment_gateways/{id}:
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/payment_gateway'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
description:
description: Payment gateway description on checkout.
type: string
enabled:
description: Payment gateway enabled status.
type: boolean
order:
description: Payment gateway sort order.
type: integer
settings:
description: Payment gateway settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
type: string
value:
description: Setting value.
type: string
type: object
title:
description: Payment gateway title on checkout.
type: string
title: payment_gateway
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/payment_gateway'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
description:
description: Payment gateway description on checkout.
type: string
enabled:
description: Payment gateway enabled status.
type: boolean
order:
description: Payment gateway sort order.
type: integer
settings:
description: Payment gateway settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
type: string
value:
description: Setting value.
type: string
type: object
title:
description: Payment gateway title on checkout.
type: string
title: payment_gateway
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/payment_gateway'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
description:
description: Payment gateway description on checkout.
type: string
enabled:
description: Payment gateway enabled status.
type: boolean
order:
description: Payment gateway sort order.
type: integer
settings:
description: Payment gateway settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
type: string
value:
description: Setting value.
type: string
type: object
title:
description: Payment gateway title on checkout.
type: string
title: payment_gateway
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/payment_gateway'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
- popularity
- rating
- popularity
- rating
- menu_order
- price
- popularity
- rating
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Limit result set to products with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to products with a specific slug.
type: string
- description: Limit result set to products assigned a specific status.
in: query
name: status
required: false
schema:
description: Limit result set to products assigned a specific status.
enum:
- any
- future
- trash
- draft
- pending
- private
- publish
type: string
- description: Limit result set to products assigned a specific type.
in: query
name: type
required: false
schema:
description: Limit result set to products assigned a specific type.
enum:
- simple
- grouped
- external
- variable
type: string
- description: Limit result set to products with specific SKU(s). Use commas
to separate.
in: query
name: sku
required: false
schema:
description: Limit result set to products with specific SKU(s). Use commas
to separate.
type: string
- description: Limit result set to featured products.
in: query
name: featured
required: false
schema:
description: Limit result set to featured products.
type: boolean
- description: Limit result set to products assigned a specific category ID.
in: query
name: category
required: false
schema:
description: Limit result set to products assigned a specific category ID.
type: string
- description: Limit result set to products assigned a specific tag ID.
in: query
name: tag
required: false
schema:
description: Limit result set to products assigned a specific tag ID.
type: string
- description: Limit result set to products assigned a specific shipping class
ID.
in: query
name: shipping_class
required: false
schema:
description: Limit result set to products assigned a specific shipping class
ID.
type: string
- description: Limit result set to products with a specific attribute. Use the
taxonomy name/attribute slug.
in: query
name: attribute
required: false
schema:
description: Limit result set to products with a specific attribute. Use
the taxonomy name/attribute slug.
type: string
- description: Limit result set to products with a specific attribute term ID
(required an assigned attribute).
in: query
name: attribute_term
required: false
schema:
description: Limit result set to products with a specific attribute term
ID (required an assigned attribute).
type: string
- description: Limit result set to products on sale.
in: query
name: on_sale
required: false
schema:
description: Limit result set to products on sale.
type: boolean
- description: Limit result set to products based on a minimum price.
in: query
name: min_price
required: false
schema:
description: Limit result set to products based on a minimum price.
type: string
- description: Limit result set to products based on a maximum price.
in: query
name: max_price
required: false
schema:
description: Limit result set to products based on a maximum price.
type: string
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
- description: Limit result set to products with specified stock status.
in: query
name: stock_status
required: false
schema:
description: Limit result set to products with specified stock status.
enum:
- instock
- outofstock
- onbackorder
type: string
- description: Limit results to those with a SKU that partial matches a string.
in: query
name: search_sku
required: false
schema:
description: Limit results to those with a SKU that partial matches a string.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: product
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Name for the resource.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: product_attribute
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes/{attribute_id}/terms:
get:
parameters:
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by resource attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by resource attribute.
enum:
- id
- include
- name
- slug
- term_group
- description
- count
type: string
- description: Whether to hide resources not assigned to any products.
in: query
name: hide_empty
required: false
schema:
description: Whether to hide resources not assigned to any products.
type: boolean
- description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
in: query
name: parent
required: false
schema:
description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
type: integer
- description: Limit result set to resources assigned to a specific product.
in: query
name: product
required: false
schema:
description: Limit result set to resources assigned to a specific product.
type: integer
- description: Limit result set to resources with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to resources with a specific slug.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Name for the resource.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_attribute_term
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes/{attribute_id}/terms/batch:
patch:
parameters:
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes/{attribute_id}/terms/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_attribute_term
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_attribute_term
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Unique identifier for the attribute of the terms.
in: path
name: attribute_id
required: true
schema:
description: Unique identifier for the attribute of the terms.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Term name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_attribute_term
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute_term'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/attributes/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: product_attribute
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: product_attribute
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
has_archives:
description: Enable/Disable attribute archives.
type: boolean
name:
description: Attribute name.
type: string
order_by:
description: Default sort order.
enum:
- menu_order
- name
- name_num
- id
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
type:
description: Type of attribute.
enum:
- select
type: string
title: product_attribute
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_attribute'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/categories:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by resource attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by resource attribute.
enum:
- id
- include
- name
- slug
- term_group
- description
- count
type: string
- description: Whether to hide resources not assigned to any products.
in: query
name: hide_empty
required: false
schema:
description: Whether to hide resources not assigned to any products.
type: boolean
- description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
in: query
name: parent
required: false
schema:
description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
type: integer
- description: Limit result set to resources assigned to a specific product.
in: query
name: product
required: false
schema:
description: Limit result set to resources assigned to a specific product.
type: integer
- description: Limit result set to resources with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to resources with a specific slug.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Name for the resource.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_cat
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/categories/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/categories/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_cat
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_cat
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
display:
description: Category archive display type.
enum:
- default
- products
- subcategories
- both
type: string
image:
description: Image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
menu_order:
description: Menu order, used to custom sort the resource.
type: integer
name:
description: Category name.
type: string
parent:
description: The ID for the parent of the resource.
type: integer
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_cat
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_cat'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/custom-fields/names:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Order sort items ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort items ascending or descending.
enum:
- asc
- desc
type: string
responses:
'200':
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/reviews:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to reviews published before a given ISO8601 compliant
date.
in: query
name: before
required: false
schema:
description: Limit response to reviews published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific IDs.
in: query
name: include
required: false
schema:
description: Limit result set to specific IDs.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- date_gmt
- id
- include
- product
type: string
- description: Limit result set to reviews assigned to specific user IDs.
in: query
name: reviewer
required: false
schema:
description: Limit result set to reviews assigned to specific user IDs.
items:
type: integer
type: array
- description: Ensure result set excludes reviews assigned to specific user
IDs.
in: query
name: reviewer_exclude
required: false
schema:
description: Ensure result set excludes reviews assigned to specific user
IDs.
items:
type: integer
type: array
- description: Limit result set to that from a specific author email.
in: query
name: reviewer_email
required: false
schema:
description: Limit result set to that from a specific author email.
format: email
type: string
- description: Limit result set to reviews assigned to specific product IDs.
in: query
name: product
required: false
schema:
description: Limit result set to reviews assigned to specific product IDs.
items:
type: integer
type: array
- description: Limit result set to reviews assigned a specific status.
in: query
name: status
required: false
schema:
description: Limit result set to reviews assigned a specific status.
enum:
- all
- hold
- approved
- spam
- trash
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: Review content.
type: string
reviewer:
description: Name of the reviewer.
type: string
reviewer_email:
description: Email of the reviewer.
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: product_review
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/reviews/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/reviews/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: product_review
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: product_review
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
product_id:
description: Unique identifier for the product that the review belongs
to.
type: integer
product_name:
description: Product name.
type: string
rating:
description: Review rating (0 to 5).
type: integer
review:
description: The content of the review.
type: string
reviewer:
description: Reviewer name.
type: string
reviewer_email:
description: Reviewer email.
format: email
type: string
status:
description: Status of the review.
enum:
- approved
- hold
- spam
- unspam
- trash
- untrash
type: string
title: product_review
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_review'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/shipping_classes:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by resource attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by resource attribute.
enum:
- id
- include
- name
- slug
- term_group
- description
- count
type: string
- description: Whether to hide resources not assigned to any products.
in: query
name: hide_empty
required: false
schema:
description: Whether to hide resources not assigned to any products.
type: boolean
- description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
in: query
name: parent
required: false
schema:
description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
type: integer
- description: Limit result set to resources assigned to a specific product.
in: query
name: product
required: false
schema:
description: Limit result set to resources assigned to a specific product.
type: integer
- description: Limit result set to resources with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to resources with a specific slug.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Name for the resource.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_shipping_class
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/shipping_classes/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/shipping_classes/slug-suggestion:
get:
parameters:
- description: Shipping class name.
in: query
name: name
required: false
schema:
description: Shipping class name.
type: string
- description: An alphanumeric identifier for the resource unique to its type.
in: query
name: slug
required: false
schema:
description: An alphanumeric identifier for the resource unique to its type.
type: string
- description: HTML description of the resource.
in: query
name: description
required: false
schema:
description: HTML description of the resource.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/shipping_classes/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_shipping_class
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_shipping_class
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Shipping class name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_shipping_class
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_shipping_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/suggested-products:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
- popularity
- rating
- popularity
- rating
- menu_order
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Limit result set to products with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to products with a specific slug.
type: string
- description: Limit result set to products assigned a specific status.
in: query
name: status
required: false
schema:
description: Limit result set to products assigned a specific status.
enum:
- any
- future
- trash
- draft
- pending
- private
- publish
type: string
- description: Limit result set to products assigned a specific type.
in: query
name: type
required: false
schema:
description: Limit result set to products assigned a specific type.
enum:
- simple
- grouped
- external
- variable
type: string
- description: Limit result set to products with specific SKU(s). Use commas
to separate.
in: query
name: sku
required: false
schema:
description: Limit result set to products with specific SKU(s). Use commas
to separate.
type: string
- description: Limit result set to featured products.
in: query
name: featured
required: false
schema:
description: Limit result set to featured products.
type: boolean
- description: Limit result set to products assigned a specific category ID.
in: query
name: category
required: false
schema:
description: Limit result set to products assigned a specific category ID.
type: string
- description: Limit result set to products assigned a specific tag ID.
in: query
name: tag
required: false
schema:
description: Limit result set to products assigned a specific tag ID.
type: string
- description: Limit result set to products assigned a specific shipping class
ID.
in: query
name: shipping_class
required: false
schema:
description: Limit result set to products assigned a specific shipping class
ID.
type: string
- description: Limit result set to products with a specific attribute. Use the
taxonomy name/attribute slug.
in: query
name: attribute
required: false
schema:
description: Limit result set to products with a specific attribute. Use
the taxonomy name/attribute slug.
type: string
- description: Limit result set to products with a specific attribute term ID
(required an assigned attribute).
in: query
name: attribute_term
required: false
schema:
description: Limit result set to products with a specific attribute term
ID (required an assigned attribute).
type: string
- description: Limit result set to products in stock or out of stock.
in: query
name: in_stock
required: false
schema:
description: Limit result set to products in stock or out of stock.
type: boolean
- description: Limit result set to products on sale.
in: query
name: on_sale
required: false
schema:
description: Limit result set to products on sale.
type: boolean
- description: Limit result set to products based on a minimum price.
in: query
name: min_price
required: false
schema:
description: Limit result set to products based on a minimum price.
type: string
- description: Limit result set to products based on a maximum price.
in: query
name: max_price
required: false
schema:
description: Limit result set to products based on a maximum price.
type: string
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
- description: Limit result set to specific product categorie ids.
in: query
name: categories
required: false
schema:
description: Limit result set to specific product categorie ids.
items:
type: integer
type: array
- description: Limit result set to specific product tag ids.
in: query
name: tags
required: false
schema:
description: Limit result set to specific product tag ids.
items:
type: integer
type: array
- description: Limit result set to specific amount of suggested products.
in: query
name: limit
required: false
schema:
description: Limit result set to specific amount of suggested products.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/tags:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items. Applies
to hierarchical taxonomies only.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by resource attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by resource attribute.
enum:
- id
- include
- name
- slug
- term_group
- description
- count
type: string
- description: Whether to hide resources not assigned to any products.
in: query
name: hide_empty
required: false
schema:
description: Whether to hide resources not assigned to any products.
type: boolean
- description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
in: query
name: parent
required: false
schema:
description: Limit result set to resources assigned to a specific parent.
Applies to hierarchical taxonomies only.
type: integer
- description: Limit result set to resources assigned to a specific product.
in: query
name: product
required: false
schema:
description: Limit result set to resources assigned to a specific product.
type: integer
- description: Limit result set to resources with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to resources with a specific slug.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Name for the resource.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_tag
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/tags/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/tags/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_tag
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_tag
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
description:
description: HTML description of the resource.
type: string
name:
description: Tag name.
type: string
slug:
description: An alphanumeric identifier for the resource unique
to its type.
type: string
title: product_tag
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_tag'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: product
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: product
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: product
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{id}/duplicate:
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
options:
description: List of available term names of the attribute.
items:
type: string
type: array
position:
description: Attribute position.
type: integer
variation:
description: Define if the attribute can be used as variation.
type: boolean
visible:
description: Define if the attribute is visible on the "Additional
information" tab in the product's page.
type: boolean
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
button_text:
description: Product external button text. Only for external products.
type: string
catalog_visibility:
description: Catalog visibility.
enum:
- visible
- catalog
- search
- hidden
type: string
categories:
description: List of categories.
items:
properties:
id:
description: Category ID.
type: integer
name:
description: Category name.
type: string
slug:
description: Category slug.
type: string
type: object
type: array
cross_sell_ids:
description: List of cross-sell products IDs.
items:
type: integer
type: array
date_created:
description: The date the product was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the product was created, as GMT.
type:
- 'null'
- string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_attributes:
description: Defaults variation attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
description:
description: Product description.
type: string
dimensions:
description: Product dimensions.
properties:
height:
description: Product height (cm).
type: string
length:
description: Product length (cm).
type: string
width:
description: Product width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the product is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
external_url:
description: Product external URL. Only for external products.
format: uri
type: string
featured:
description: Featured product.
type: boolean
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
images:
description: List of images.
items:
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
type: array
low_stock_amount:
description: Low Stock amount for the product.
type:
- integer
- 'null'
manage_stock:
description: Stock management at product level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
name:
description: Product name.
type: string
parent_id:
description: Product parent ID.
type: integer
post_password:
description: Post password.
type: string
purchase_note:
description: Optional note to send the customer after purchase.
type: string
regular_price:
description: Product regular price.
type: string
reviews_allowed:
description: Allow reviews.
type: boolean
sale_price:
description: Product sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
short_description:
description: Product short description.
type: string
sku:
description: Stock Keeping Unit.
type: string
slug:
description: Product slug.
type: string
sold_individually:
description: Allow one item to be bought in a single order.
type: boolean
status:
description: Product status (post status).
enum:
- draft
- pending
- private
- publish
- future
- auto-draft
- trash
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tags:
description: List of tags.
items:
properties:
id:
description: Tag ID.
type: integer
name:
description: Tag name.
type: string
slug:
description: Tag slug.
type: string
type: object
type: array
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
type:
description: Product type.
enum:
- simple
- grouped
- external
- variable
type: string
upsell_ids:
description: List of up-sell products IDs.
items:
type: integer
type: array
virtual:
description: If the product is virtual.
type: boolean
weight:
description: Product weight (kg).
type: string
title: product
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{product_id}/variations:
get:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
- menu_order
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Limit result set to products with a specific slug.
in: query
name: slug
required: false
schema:
description: Limit result set to products with a specific slug.
type: string
- description: Limit result set to products assigned a specific status.
in: query
name: status
required: false
schema:
description: Limit result set to products assigned a specific status.
enum:
- any
- future
- trash
- draft
- pending
- private
- publish
type: string
- description: Limit result set to products with specific SKU(s). Use commas
to separate.
in: query
name: sku
required: false
schema:
description: Limit result set to products with specific SKU(s). Use commas
to separate.
type: string
- description: Limit result set to products on sale.
in: query
name: on_sale
required: false
schema:
description: Limit result set to products on sale.
type: boolean
- description: Limit result set to products based on a minimum price.
in: query
name: min_price
required: false
schema:
description: Limit result set to products based on a minimum price.
type: string
- description: Limit result set to products based on a maximum price.
in: query
name: max_price
required: false
schema:
description: Limit result set to products based on a maximum price.
type: string
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
- description: Limit result set to products with specified stock status.
in: query
name: stock_status
required: false
schema:
description: Limit result set to products with specified stock status.
enum:
- instock
- outofstock
- onbackorder
type: string
- description: Limit result set to products with or without price.
in: query
name: has_price
required: false
schema:
description: Limit result set to products with or without price.
type: boolean
- description: Limit result set to products with specified attributes.
in: query
name: attributes
required: false
schema:
description: Limit result set to products with specified attributes.
items:
properties:
attribute:
description: Attribute slug.
type: string
term:
description: Attribute term.
type: string
terms:
description: Attribute terms.
type: array
type: object
type: array
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: product_variation
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{product_id}/variations/batch:
patch:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{product_id}/variations/generate:
post:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
default_values:
description: Default values for generated variations.
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders
are allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files
expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's
timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the
site's timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
type: object
delete:
description: Deletes unused variations.
type: boolean
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: product_variation
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/products/{product_id}/variations/{id}:
delete:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Unique identifier for the variation.
in: path
name: id
required: true
schema:
description: Unique identifier for the variation.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Unique identifier for the variation.
in: path
name: id
required: true
schema:
description: Unique identifier for the variation.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Unique identifier for the variation.
in: path
name: id
required: true
schema:
description: Unique identifier for the variation.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: product_variation
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Unique identifier for the variation.
in: path
name: id
required: true
schema:
description: Unique identifier for the variation.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: product_variation
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the variable product.
in: path
name: product_id
required: true
schema:
description: Unique identifier for the variable product.
type: integer
- description: Unique identifier for the variation.
in: path
name: id
required: true
schema:
description: Unique identifier for the variation.
type: integer
requestBody:
content:
application/json:
schema:
properties:
attributes:
description: List of attributes.
items:
properties:
id:
description: Attribute ID.
type: integer
name:
description: Attribute name.
type: string
option:
description: Selected attribute term name.
type: string
type: object
type: array
backorders:
description: If managing stock, this controls if backorders are
allowed.
enum:
- 'no'
- notify
- 'yes'
type: string
date_on_sale_from:
description: Start date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_from_gmt:
description: Start date of sale price, as GMT.
type:
- 'null'
- string
date_on_sale_to:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
date_on_sale_to_gmt:
description: End date of sale price, in the site's timezone.
type:
- 'null'
- string
description:
description: Variation description.
type: string
dimensions:
description: Variation dimensions.
properties:
height:
description: Variation height (cm).
type: string
length:
description: Variation length (cm).
type: string
width:
description: Variation width (cm).
type: string
type: object
download_expiry:
description: Number of days until access to downloadable files expires.
type: integer
download_limit:
description: Number of times downloadable files can be downloaded
after purchase.
type: integer
downloadable:
description: If the variation is downloadable.
type: boolean
downloads:
description: List of downloadable files.
items:
properties:
file:
description: File URL.
type: string
id:
description: File ID.
type: string
name:
description: File name.
type: string
type: object
type: array
global_unique_id:
description: GTIN, UPC, EAN or ISBN.
type: string
image:
description: Variation image data.
properties:
alt:
description: Image alternative text.
type: string
date_created:
description: The date the image was created, in the site's timezone.
type:
- 'null'
- string
date_created_gmt:
description: The date the image was created, as GMT.
type:
- 'null'
- string
date_modified:
description: The date the image was last modified, in the site's
timezone.
type:
- 'null'
- string
date_modified_gmt:
description: The date the image was last modified, as GMT.
type:
- 'null'
- string
id:
description: Image ID.
type: integer
name:
description: Image name.
type: string
src:
description: Image URL.
format: uri
type: string
type: object
low_stock_amount:
description: Low Stock amount for the variation.
type:
- integer
- 'null'
manage_stock:
description: Stock management at variation level.
type: boolean
menu_order:
description: Menu order, used to custom sort products.
type: integer
meta_data:
description: Meta data.
items:
properties:
id:
description: Meta ID.
type: integer
key:
description: Meta key.
type: string
value:
description: Meta value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
type: object
type: array
regular_price:
description: Variation regular price.
type: string
sale_price:
description: Variation sale price.
type: string
shipping_class:
description: Shipping class slug.
type: string
sku:
description: Stock Keeping Unit.
type: string
status:
description: Variation status.
enum:
- draft
- pending
- private
- publish
type: string
stock_quantity:
description: Stock quantity.
type: integer
stock_status:
description: Controls the stock status of the product.
enum:
- instock
- outofstock
- onbackorder
type: string
tax_class:
description: Tax class.
type: string
tax_status:
description: Tax status.
enum:
- taxable
- shipping
- none
type: string
virtual:
description: If the variation is virtual.
type: boolean
weight:
description: Variation weight (kg).
type: string
title: product_variation
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product_variation'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/refunds:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified after a given ISO8601 compliant
date.
in: query
name: modified_after
required: false
schema:
description: Limit response to resources modified after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources modified before a given ISO8601 compliant
date.
in: query
name: modified_before
required: false
schema:
description: Limit response to resources modified before a given ISO8601
compliant date.
format: date-time
type: string
- description: Whether to consider GMT post dates when limiting response by
published or modified date.
in: query
name: dates_are_gmt
required: false
schema:
description: Whether to consider GMT post dates when limiting response by
published or modified date.
type: boolean
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- include
- title
- slug
- modified
type: string
- description: Limit result set to those of particular parent IDs.
in: query
name: parent
required: false
schema:
description: Limit result set to those of particular parent IDs.
items:
type: integer
type: array
- description: Limit result set to all items except those of a particular parent
ID.
in: query
name: parent_exclude
required: false
schema:
description: Limit result set to all items except those of a particular
parent ID.
items:
type: integer
type: array
- description: Number of decimal points to use in each resource.
in: query
name: dp
required: false
schema:
description: Number of decimal points to use in each resource.
type: integer
- description: Only show meta which is meant to be displayed for an order.
in: query
name: order_item_display_meta
required: false
schema:
description: Only show meta which is meant to be displayed for an order.
type: boolean
- description: Limit meta_data to specific keys.
in: query
name: include_meta
required: false
schema:
description: Limit meta_data to specific keys.
items:
type: string
type: array
- description: Ensure meta_data excludes specific keys.
in: query
name: exclude_meta
required: false
schema:
description: Ensure meta_data excludes specific keys.
items:
type: string
type: array
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shop_order_refund'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/coupons/totals:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report_coupon_total'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/customers/totals:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report_customer_total'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/orders/totals:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report_order_total'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/products/totals:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report_product_total'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/reviews/totals:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/report_review_total'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/sales:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
- description: Report period.
in: query
name: period
required: false
schema:
description: Report period.
enum:
- week
- month
- last_month
- year
type: string
- description: Return sales for a specific start date, the date need to be in
the YYYY-MM-DD format.
in: query
name: date_min
required: false
schema:
description: Return sales for a specific start date, the date need to be
in the YYYY-MM-DD format.
format: date
type: string
- description: Return sales for a specific end date, the date need to be in
the YYYY-MM-DD format.
in: query
name: date_max
required: false
schema:
description: Return sales for a specific end date, the date need to be in
the YYYY-MM-DD format.
format: date
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/sales_report'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/reports/top_sellers:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
- description: Report period.
in: query
name: period
required: false
schema:
description: Report period.
enum:
- week
- month
- last_month
- year
type: string
- description: Return sales for a specific start date, the date need to be in
the YYYY-MM-DD format.
in: query
name: date_min
required: false
schema:
description: Return sales for a specific start date, the date need to be
in the YYYY-MM-DD format.
format: date
type: string
- description: Return sales for a specific end date, the date need to be in
the YYYY-MM-DD format.
in: query
name: date_max
required: false
schema:
description: Return sales for a specific end date, the date need to be in
the YYYY-MM-DD format.
format: date
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/top_sellers_report'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/settings:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting_group'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/settings/batch:
patch:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/settings/{group_id}:
get:
parameters:
- description: Settings group ID.
in: query
name: group
required: false
schema:
description: Settings group ID.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/settings/{group_id}/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/settings/{group_id}/{id}:
get:
parameters:
- description: Settings group ID.
in: query
name: group
required: false
schema:
description: Settings group ID.
type: string
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: setting
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: setting
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
requestBody:
content:
application/json:
schema:
properties:
group:
description: Settings group ID.
type: string
value:
description: Setting value.
type:
- 'null'
- object
- string
- number
- boolean
- integer
- array
title: setting
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/setting'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping/zones:
get:
parameters: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
name:
description: Shipping zone name.
type: string
order:
description: Shipping zone order.
type: integer
title: shipping_zone
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping/zones/{id}:
delete:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: Shipping zone name.
type: string
order:
description: Shipping zone order.
type: integer
title: shipping_zone
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: Shipping zone name.
type: string
order:
description: Shipping zone order.
type: integer
title: shipping_zone
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: Shipping zone name.
type: string
order:
description: Shipping zone order.
type: integer
title: shipping_zone
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping/zones/{id}/locations:
get:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_location'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
code:
description: Shipping zone location code.
type: string
type:
description: Shipping zone location type.
enum:
- postcode
- state
- country
- continent
type: string
title: shipping_zone_location
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_location'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
code:
description: Shipping zone location code.
type: string
type:
description: Shipping zone location type.
enum:
- postcode
- state
- country
- continent
type: string
title: shipping_zone_location
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_location'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique ID for the resource.
in: path
name: id
required: true
schema:
description: Unique ID for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
code:
description: Shipping zone location code.
type: string
type:
description: Shipping zone location type.
enum:
- postcode
- state
- country
- continent
type: string
title: shipping_zone_location
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_location'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping/zones/{zone_id}/methods:
get:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
requestBody:
content:
application/json:
schema:
properties:
enabled:
description: Shipping method enabled status.
type: boolean
method_id:
description: Shipping method ID.
type: string
order:
description: Shipping method sort order.
type: integer
settings:
description: Shipping method settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
- class
- order
type: string
value:
description: Setting value.
type: string
type: object
title: shipping_zone_method
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping/zones/{zone_id}/methods/{instance_id}:
delete:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
- description: Unique ID for the instance.
in: path
name: instance_id
required: true
schema:
description: Unique ID for the instance.
type: integer
- description: Whether to bypass trash and force deletion.
in: query
name: force
required: false
schema:
description: Whether to bypass trash and force deletion.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
- description: Unique ID for the instance.
in: path
name: instance_id
required: true
schema:
description: Unique ID for the instance.
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
- description: Unique ID for the instance.
in: path
name: instance_id
required: true
schema:
description: Unique ID for the instance.
type: integer
requestBody:
content:
application/json:
schema:
properties:
enabled:
description: Shipping method enabled status.
type: boolean
order:
description: Shipping method sort order.
type: integer
settings:
description: Shipping method settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
- class
- order
type: string
value:
description: Setting value.
type: string
type: object
title: shipping_zone_method
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
- description: Unique ID for the instance.
in: path
name: instance_id
required: true
schema:
description: Unique ID for the instance.
type: integer
requestBody:
content:
application/json:
schema:
properties:
enabled:
description: Shipping method enabled status.
type: boolean
order:
description: Shipping method sort order.
type: integer
settings:
description: Shipping method settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
- class
- order
type: string
value:
description: Setting value.
type: string
type: object
title: shipping_zone_method
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique ID for the zone.
in: path
name: zone_id
required: true
schema:
description: Unique ID for the zone.
type: integer
- description: Unique ID for the instance.
in: path
name: instance_id
required: true
schema:
description: Unique ID for the instance.
type: integer
requestBody:
content:
application/json:
schema:
properties:
enabled:
description: Shipping method enabled status.
type: boolean
order:
description: Shipping method sort order.
type: integer
settings:
description: Shipping method settings.
properties:
default:
description: Default value for the setting.
type: string
description:
description: A human readable description for the setting used
in interfaces.
type: string
id:
description: A unique identifier for the setting.
type: string
label:
description: A human readable label for the setting used in
interfaces.
type: string
placeholder:
description: Placeholder text to be displayed in text inputs.
type: string
tip:
description: Additional help text shown to the user about the
setting.
type: string
type:
description: Type of setting.
enum:
- text
- email
- number
- color
- password
- textarea
- select
- multiselect
- radio
- image_width
- checkbox
- class
- order
type: string
value:
description: Setting value.
type: string
type: object
title: shipping_zone_method
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_zone_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping_methods:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/shipping_methods/{id}:
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/shipping_method'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/system_status:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/system_status/tools:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status_tool'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/system_status/tools/{id}:
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status_tool'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: A unique identifier for the tool.
in: path
name: id
required: true
schema:
description: A unique identifier for the tool.
type: string
requestBody:
content:
application/json:
schema:
properties:
action:
description: What running the tool will do.
type: string
description:
description: Tool description.
type: string
message:
description: Tool return message.
type: string
name:
description: Tool name.
type: string
success:
description: Did the tool run successfully?
type: boolean
title: system_status_tool
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status_tool'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: A unique identifier for the tool.
in: path
name: id
required: true
schema:
description: A unique identifier for the tool.
type: string
requestBody:
content:
application/json:
schema:
properties:
action:
description: What running the tool will do.
type: string
description:
description: Tool description.
type: string
message:
description: Tool return message.
type: string
name:
description: Tool name.
type: string
success:
description: Did the tool run successfully?
type: boolean
title: system_status_tool
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status_tool'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: A unique identifier for the tool.
in: path
name: id
required: true
schema:
description: A unique identifier for the tool.
type: string
requestBody:
content:
application/json:
schema:
properties:
action:
description: What running the tool will do.
type: string
description:
description: Tool description.
type: string
message:
description: Tool return message.
type: string
name:
description: Tool name.
type: string
success:
description: Did the tool run successfully?
type: boolean
title: system_status_tool
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/system_status_tool'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/taxes:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- id
- order
- priority
type: string
- description: Sort by tax class.
in: query
name: class
required: false
schema:
description: Sort by tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: tax
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/taxes/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/taxes/classes:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
name:
description: Tax class name.
type: string
title: tax_class
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/taxes/classes/{slug}:
delete:
parameters:
- description: Unique slug for the resource.
in: path
name: slug
required: true
schema:
description: Unique slug for the resource.
type: string
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique slug for the resource.
in: path
name: slug
required: true
schema:
description: Unique slug for the resource.
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax_class'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/taxes/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: tax
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: tax
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
cities:
description: List of city names. Introduced in WooCommerce 5.3.
items:
type: string
type: array
city:
description: City name, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'cities' should be used instead.
type: string
class:
description: Tax class.
enum:
- standard
- reduced-rate
- zero-rate
type: string
compound:
description: Whether or not this is a compound rate.
type: boolean
country:
description: Country ISO 3166 code.
type: string
name:
description: Tax rate name.
type: string
order:
description: Indicates the order that will appear in queries.
type: integer
postcode:
description: Postcode/ZIP, it doesn't support multiple values. Deprecated
as of WooCommerce 5.3, 'postcodes' should be used instead.
type: string
postcodes:
description: List of postcodes / ZIPs. Introduced in WooCommerce
5.3.
items:
type: string
type: array
priority:
description: Tax priority.
type: integer
rate:
description: Tax rate.
type: string
shipping:
description: Whether or not this tax rate also gets applied to shipping.
type: boolean
state:
description: State code.
type: string
title: tax
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/tax'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/webhooks:
get:
parameters:
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
- description: Current page of the collection.
in: query
name: page
required: false
schema:
description: Current page of the collection.
type: integer
- description: Maximum number of items to be returned in result set.
in: query
name: per_page
required: false
schema:
description: Maximum number of items to be returned in result set.
type: integer
- description: Limit results to those matching a string.
in: query
name: search
required: false
schema:
description: Limit results to those matching a string.
type: string
- description: Limit response to resources published after a given ISO8601 compliant
date.
in: query
name: after
required: false
schema:
description: Limit response to resources published after a given ISO8601
compliant date.
format: date-time
type: string
- description: Limit response to resources published before a given ISO8601
compliant date.
in: query
name: before
required: false
schema:
description: Limit response to resources published before a given ISO8601
compliant date.
format: date-time
type: string
- description: Ensure result set excludes specific IDs.
in: query
name: exclude
required: false
schema:
description: Ensure result set excludes specific IDs.
items:
type: integer
type: array
- description: Limit result set to specific ids.
in: query
name: include
required: false
schema:
description: Limit result set to specific ids.
items:
type: integer
type: array
- description: Offset the result set by a specific number of items.
in: query
name: offset
required: false
schema:
description: Offset the result set by a specific number of items.
type: integer
- description: Order sort attribute ascending or descending.
in: query
name: order
required: false
schema:
description: Order sort attribute ascending or descending.
enum:
- asc
- desc
type: string
- description: Sort collection by object attribute.
in: query
name: orderby
required: false
schema:
description: Sort collection by object attribute.
enum:
- date
- id
- title
type: string
- description: Limit result set to webhooks assigned a specific status.
in: query
name: status
required: false
schema:
description: Limit result set to webhooks assigned a specific status.
enum:
- all
- active
- paused
- disabled
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
delivery_url:
description: Webhook delivery URL.
type: string
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: webhook
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/webhooks/batch:
patch:
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: batch
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/batch'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
/webhooks/{id}:
delete:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Required to be true, as resource does not support trashing.
in: query
name: force
required: false
schema:
description: Required to be true, as resource does not support trashing.
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
get:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
- description: Scope under which the request is made; determines fields present
in response.
in: query
name: context
required: false
schema:
description: Scope under which the request is made; determines fields present
in response.
enum:
- view
- edit
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
patch:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: webhook
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
post:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: webhook
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
put:
parameters:
- description: Unique identifier for the resource.
in: path
name: id
required: true
schema:
description: Unique identifier for the resource.
type: integer
requestBody:
content:
application/json:
schema:
properties:
name:
description: A friendly name for the webhook.
type: string
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
status:
description: Webhook status.
enum:
- active
- paused
- disabled
type: string
topic:
description: Webhook topic.
type: string
title: webhook
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webhook'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/WPError'
description: Bad Request
'404':
description: Not Found
tags:
- root
security: []
servers:
- url: ***********
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment