@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api WooCommerce REST API
@base https://example-woocommerce-shop.com/wp-json/wc/v3
@version v3
@auth Bearer basic
@endpoints 122
@hint download_for_search
@toc customers(6), products(49), orders(14), reports(8), coupons(6), settings(4), shipping(12), payment_gateways(3), taxes(10), webhooks(6), system_status(4)

@group customers
@endpoint POST /customers
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map]}
@errors {401, 404}

@endpoint GET /customers
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, exclude: [int], include: [int], offset: int, order: str(asc/desc)=asc, orderby: str(id/include/name/registered_date)=name, email: str, role: str(all/administrator/editor/author/contributor/subscriber/customer/shop_manager)=customer}
@returns(200)
@errors {401, 404}

@endpoint GET /customers/{customerId}
@required {customerId: int}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map]}
@errors {401, 404}

@endpoint PUT /customers/{customerId}
@required {customerId: int}
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map]}
@errors {401, 404}

@endpoint DELETE /customers/{customerId}
@required {customerId: int, force: str}
@optional {reassign: int}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, is_paying_customer: bool, avatar_url: str, meta_data: [map]}
@errors {401, 404}

@endpoint POST /customers/batch
@optional {create: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map, shipping: map, is_paying_customer: bool, avatar_url: str, meta_data: [map]}], update: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), email: str, first_name: str, last_name: str, role: str, username: str, password: str, billing: map, shipping: map, is_paying_customer: bool, avatar_url: str, meta_data: [map]}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endgroup

@group products
@endpoint POST /products
@optional {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map{id: str, name: str, file: str}], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map{id: int, name: str, slug: str}], tags: [map{id: int, name!: str, slug: str, description: str, count: int}], images: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}], attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], default_attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(201) {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint GET /products
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str, before: str, modified_after: str, modified_before: str, dates_are_gmt: bool, exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/modified/id/include/title/slug/price/popularity/rating/menu_order)=date, parent: [int], parent_exclude: [int], slug: str, status: [str], include_status: [str], exclude_status: [str], type: str(simple/grouped/external/variable), include_types: [str], exclude_types: [str], sku: str, featured: bool, category: str, tag: str, shipping_class: str, attribute: str, attribute_term: str, tax_class: str(standard/reduced-rate/zero-rate), on_sale: bool, min_price: str, max_price: str, stock_status: str(instock/outofstock/onbackorder), virtual: bool, downloadable: bool}
@returns(200)
@errors {400, 401}

@endpoint GET /products/{productId}
@required {productId: int}
@returns(200) {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint PUT /products/{productId}
@required {productId: int}
@optional {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map{id: str, name: str, file: str}], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map{id: int, name: str, slug: str}], tags: [map{id: int, name!: str, slug: str, description: str, count: int}], images: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}], attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], default_attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(200) {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint DELETE /products/{productId}
@required {productId: int, force: bool=true}
@returns(200) {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint POST /products/{productId}/duplicate
@required {productId: int}
@returns(201) {id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint POST /products/batch
@optional {create: [map{id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}], update: [map{id: int, name: str, slug: str, permalink: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), type: str, status: str, featured: bool, catalog_visibility: str, description: str, short_description: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), price_html: str, on_sale: bool, purchasable: bool, total_sales: int(int64), virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, external_url: str, button_text: str, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, sold_individually: bool, weight: str, dimensions: map, shipping_required: bool, shipping_taxable: bool, shipping_class: str, shipping_class_id: int, reviews_allowed: bool, average_rating: str, rating_count: int, related_ids: [int], upsell_ids: [int], cross_sell_ids: [int], parent_id: int, purchase_note: str, categories: [map], tags: [map], images: [map], attributes: [map], default_attributes: [map], variations: [int], grouped_products: [int], menu_order: int, meta_data: [map]}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endpoint POST /products/{productId}/variations
@required {productId: int}
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map{id: str, name: str, file: str}], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], menu_order: int, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(201) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint GET /products/{productId}/variations
@required {productId: int}
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str(date-time), before: str(date-time), exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/modified/id/include/title/slug)=date, parent: [int], parent_exclude: [int], slug: str, status: [str], include_status: [str], exclude_status: [str], sku: str, tax_class: str(standard/reduced-rate/zero-rate), on_sale: bool, min_price: str, max_price: str, stock_status: str(instock/outofstock/onbackorder), virtual: bool, downloadable: bool}
@returns(200)
@errors {401, 404}

@endpoint GET /products/{productId}/variations/{variationId}
@required {productId: int, variationId: int}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint PUT /products/{productId}/variations/{variationId}
@required {productId: int, variationId: int}
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map{id: str, name: str, file: str}], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], menu_order: int, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint DELETE /products/{productId}/variations/{variationId}
@required {productId: int, variationId: int, force: bool=true}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map{length: str, width: str, height: str}, shipping_class: str, shipping_class_id: int, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, attributes: [map], menu_order: int, meta_data: [map]}
@errors {401, 404}

@endpoint POST /products/{productId}/variations/batch
@required {productId: int}
@optional {create: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map, shipping_class: str, shipping_class_id: int, image: map, attributes: [map], menu_order: int, meta_data: [map]}], update: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), description: str, permalink: str, sku: str, price: str, regular_price: str, sale_price: str, date_on_sale_from: str(date-time), date_on_sale_from_gmt: str(date-time), date_on_sale_to: str(date-time), date_on_sale_to_gmt: str(date-time), on_sale: bool, status: str, purchasable: bool, virtual: bool, downloadable: bool, downloads: [map], download_limit: int, download_expiry: int, tax_status: str, tax_class: str, manage_stock: bool, stock_quantity: int, stock_status: str, backorders: str, backorders_allowed: bool, backordered: bool, weight: str, dimensions: map, shipping_class: str, shipping_class_id: int, image: map, attributes: [map], menu_order: int, meta_data: [map]}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endpoint GET /products/attributes
@optional {context: str(view/edit)=view}
@returns(200)

@endpoint POST /products/attributes
@optional {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}
@returns(201) {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}

@endpoint GET /products/attributes/{attributeId}
@required {attributeId: int}
@returns(200) {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}

@endpoint PUT /products/attributes/{attributeId}
@required {attributeId: int}
@optional {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}
@returns(200) {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}

@endpoint DELETE /products/attributes/{attributeId}
@required {attributeId: int, force: bool=true}
@returns(200) {id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}

@endpoint POST /products/attributes/batch
@optional {create: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], update: [map{id: int, name: str, option: str, slug: str, type: str, order_by: str, has_archives: bool}], delete: [int]}
@returns(200)

@endpoint GET /products/attributes/{attributeId}/terms
@required {attributeId: int}
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, orderby: str(name/slug/term_group/description/count)=name, order: str(asc/desc)=asc, hide_empty: bool=false, parent: int, product: int, slug: str, include: [int], exclude: [int]}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /products/attributes/{attributeId}/terms
@required {attributeId: int}
@optional {id: int, name: str, slug: str, description: str, menu_order: int, count: int}
@returns(201) {id: int, name: str, slug: str, description: str, menu_order: int, count: int}

@endpoint GET /products/attributes/{attributeId}/terms/{termId}
@required {attributeId: int, termId: int}
@returns(200) {id: int, name: str, slug: str, description: str, menu_order: int, count: int}

@endpoint PUT /products/attributes/{attributeId}/terms/{termId}
@required {attributeId: int, termId: int}
@optional {id: int, name: str, slug: str, description: str, menu_order: int, count: int}
@returns(200) {id: int, name: str, slug: str, description: str, menu_order: int, count: int}

@endpoint DELETE /products/attributes/{attributeId}/terms/{termId}
@required {attributeId: int, termId: int, force: bool=true}
@returns(200) {id: int, name: str, slug: str, description: str, menu_order: int, count: int}

@endpoint POST /products/attributes/{attributeId}/terms/batch
@required {attributeId: int}
@optional {create: [map{id: int, name: str, slug: str, description: str, menu_order: int, count: int}], update: [map{id: int, name: str, slug: str, description: str, menu_order: int, count: int}], delete: [int]}
@returns(200)

@endpoint POST /products/categories
@required {name: str}
@optional {id: int, slug: str, parent: int, description: str, display: str(default/products/subcategories/both)=default, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}
@returns(201) {id: int, name: str, slug: str, parent: int, description: str, display: str, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}
@errors {401, 404}

@endpoint GET /products/categories
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, exclude: [int], include: [int], order: str(asc/desc)=asc, orderby: str(id/include/name/slug/term_group/description/count)=name, hide_empty: bool=false, parent: int, product: int, slug: str}
@returns(200)
@errors {401, 404}

@endpoint GET /products/categories/{categoryId}
@required {categoryId: int}
@returns(200) {id: int, name: str, slug: str, parent: int, description: str, display: str, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}
@errors {401, 404}

@endpoint PUT /products/categories/{categoryId}
@required {categoryId: int, name: str}
@optional {id: int, slug: str, parent: int, description: str, display: str(default/products/subcategories/both)=default, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}
@returns(200) {id: int, name: str, slug: str, parent: int, description: str, display: str, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}
@errors {401, 404}

@endpoint DELETE /products/categories/{categoryId}
@required {categoryId: int, force: bool=true}
@returns(200) {id: int, name: str, slug: str, parent: int, description: str, display: str, image: map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), src: str, name: str, alt: str}, menu_order: int, count: int}

@endpoint POST /products/categories/batch
@optional {create: [map{id: int, name!: str, slug: str, parent: int, description: str, display: str, image: map, menu_order: int, count: int}], update: [map{id: int, name!: str, slug: str, parent: int, description: str, display: str, image: map, menu_order: int, count: int}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endpoint GET /products/shipping-classes
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, orderby: str(id/include/name/slug/term_group/description/count)=name, order: str(asc/desc)=asc, hide_empty: bool=false, parent: int, product: int, slug: str, include: [int], exclude: [int]}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /products/shipping-classes
@optional {id: int, name: str, slug: str, description: str, count: int}
@returns(201) {id: int, name: str, slug: str, description: str, count: int}

@endpoint GET /products/shipping-classes/{classId}
@required {classId: int}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}

@endpoint PUT /products/shipping-classes/{classId}
@required {classId: int}
@optional {id: int, name: str, slug: str, description: str, count: int}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}

@endpoint DELETE /products/shipping-classes/{classId}
@required {classId: int, force: bool=true}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}

@endpoint POST /products/shipping-classes/batch
@optional {create: [map{id: int, name: str, slug: str, description: str, count: int}], update: [map{id: int, name: str, slug: str, description: str, count: int}], delete: [int]}
@returns(200)

@endpoint POST /products/tags
@required {name: str}
@optional {id: int, slug: str, description: str, count: int}
@returns(201) {id: int, name: str, slug: str, description: str, count: int}
@errors {401, 404}

@endpoint GET /products/tags
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, exclude: [int], include: [int], offset: int, order: str(asc/desc)=asc, orderby: str(id/include/name/slug/term_group/description/count)=name, hide_empty: bool=false, product: int, slug: str}
@returns(200)
@errors {401, 404}

@endpoint GET /products/tags/{tagId}
@required {tagId: int}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}
@errors {401, 404}

@endpoint PUT /products/tags/{tagId}
@required {tagId: int, name: str}
@optional {id: int, slug: str, description: str, count: int}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}
@errors {401, 404}

@endpoint DELETE /products/tags/{tagId}
@required {tagId: int, force: bool=true}
@returns(200) {id: int, name: str, slug: str, description: str, count: int}

@endpoint POST /products/tags/batch
@optional {create: [map{id: int, name!: str, slug: str, description: str, count: int}], update: [map{id: int, name!: str, slug: str, description: str, count: int}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endgroup

@group orders
@endpoint POST /orders
@optional {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str(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), date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}], line_items: [map{id: int, name: str, parent_name: str, product_id: int, variation_id: int, quantity: int, tax_class: str, subtotal: str, subtotal_tax: str, total: str, total_tax: str, taxes: [map], meta_data: [map], sku: str, price: num}], tax_lines: [map{id: int, rate_code: str, rate_id: str, label: str, compound: bool, tax_total: str, shipping_tax_total: str, meta_data: [map]}], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map{id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map], refunded_by: int, refunded_payment: bool, meta_data: [map]}], set_paid: bool}
@returns(201) {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}
@errors {401, 404}

@endpoint GET /orders
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str(date-time), before: str(date-time), modified_after: str(date-time), modified_before: str(date-time), dates_are_gmt: bool, exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/modified/id/include/title/slug)=date, parent: [int], parent_exclude: [int], status: [str], customer: int, product: int, dp: int=2}
@returns(200)
@errors {400, 401}

@endpoint GET /orders/{orderId}
@required {orderId: int}
@returns(200) {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}
@errors {401, 404}

@endpoint PUT /orders/{orderId}
@required {orderId: int}
@optional {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str(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), date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}], line_items: [map{id: int, name: str, parent_name: str, product_id: int, variation_id: int, quantity: int, tax_class: str, subtotal: str, subtotal_tax: str, total: str, total_tax: str, taxes: [map], meta_data: [map], sku: str, price: num}], tax_lines: [map{id: int, rate_code: str, rate_id: str, label: str, compound: bool, tax_total: str, shipping_tax_total: str, meta_data: [map]}], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map{id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map], refunded_by: int, refunded_payment: bool, meta_data: [map]}], set_paid: bool}
@returns(200) {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}
@errors {401, 404}

@endpoint DELETE /orders/{orderId}
@required {orderId: int, force: bool=true}
@returns(200) {id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, email: str, phone: str}, shipping: map{first_name: str, last_name: str, company: str, address_1: str, address_2: str, city: str, state: str, postcode: str, country: str, phone: str}, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}
@errors {401, 404}

@endpoint POST /orders/batch
@optional {create: [map{id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map, shipping: map, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}], update: [map{id: int, parent_id: int, number: str, order_key: str, created_via: str, version: str, status: str, currency: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_total: str, discount_tax: str, shipping_total: str, shipping_tax: str, cart_tax: str, total: str, total_tax: str, prices_include_tax: bool, customer_id: int, customer_ip_address: str, customer_user_agent: str, customer_note: str, billing: map, shipping: map, payment_method: str, payment_method_title: str, transaction_id: str, date_paid: str(date-time), date_paid_gmt: str(date-time), date_completed: str(date-time), date_completed_gmt: str(date-time), cart_hash: str, meta_data: [map], line_items: [map], tax_lines: [map], shipping_lines: [any], fee_lines: [any], coupon_lines: [any], refunds: [map], set_paid: bool}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}

@endpoint GET /orders/{orderId}/notes
@required {orderId: int}
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10}
@returns(200)
@errors {401, 404}

@endpoint POST /orders/{orderId}/notes
@required {orderId: int}
@optional {id: int, author: str, date_created: str(date-time), date_created_gmt: str(date-time), note: str, customer_note: bool}
@returns(201) {id: int, author: str, date_created: str(date-time), date_created_gmt: str(date-time), note: str, customer_note: bool}
@errors {401, 404}

@endpoint GET /orders/{orderId}/notes/{noteId}
@required {orderId: int, noteId: int}
@returns(200) {id: int, author: str, date_created: str(date-time), date_created_gmt: str(date-time), note: str, customer_note: bool}
@errors {401, 404}

@endpoint DELETE /orders/{orderId}/notes/{noteId}
@required {orderId: int, noteId: int, force: bool=true}
@returns(200) {id: int, author: str, date_created: str(date-time), date_created_gmt: str(date-time), note: str, customer_note: bool}
@errors {401, 404}

@endgroup

@group products
@endpoint GET /products/reviews
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str(date-time), before: str(date-time), exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/date_gmt/id/slug/include/product)=date_gmt, reviewer: [int], reviewer_exclude: [int], reviewer_email: [int], product: [int], status: str(all/hold/approved/spam/trash)=approved}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /products/reviews
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str(approved/hold/spam/unspam/trash/untrash)=approved, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}
@returns(201) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}

@endpoint GET /products/reviews/{reviewId}
@required {reviewId: int}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}

@endpoint PUT /products/reviews/{reviewId}
@required {reviewId: int}
@optional {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str(approved/hold/spam/unspam/trash/untrash)=approved, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}

@endpoint DELETE /products/reviews/{reviewId}
@required {reviewId: int, force: bool=true}
@returns(200) {id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}

@endpoint POST /products/reviews/batch
@optional {create: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}], update: [map{id: int, date_created: str(date-time), date_created_gmt: str(date-time), product_id: int, status: str, reviewer: str, reviewer_email: str(email), review: str, rating: int, verified: bool}], delete: [int]}
@returns(200)

@endgroup

@group reports
@endpoint GET /reports
@returns(200)
@errors {401, 404}

@endpoint GET /reports/top_sellers
@optional {context: str=view, period: str(week/month/last_month/year), date_min: str, date_max: str}
@returns(200)
@errors {401, 404}

@endpoint GET /reports/coupons/totals
@returns(200)
@errors {401, 404}

@endpoint GET /reports/customers/totals
@returns(200)
@errors {401, 404}

@endpoint GET /reports/orders/totals
@returns(200)
@errors {401}

@endpoint GET /reports/products/totals
@returns(200)
@errors {401, 404}

@endpoint GET /reports/reviews/totals
@returns(200)
@errors {401, 404}

@endpoint GET /reports/sales
@optional {period: str(week/month/last_month/year), date_min: str, date_max: str}
@returns(200)
@errors {400, 401}

@endgroup

@group orders
@endpoint GET /orders/{orderId}/refunds
@required {orderId: int}
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10}
@returns(200)
@errors {401, 404}

@endpoint POST /orders/{orderId}/refunds
@required {orderId: int}
@optional {id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map{id: int, name: str, product_id: int, variation_id: int, quantity: int, tax_class: str, subtotal: str, subtotal_tax: str, total: str, total_tax: str, taxes: [map], meta_data: [map], sku: str, price: num(float)}], refunded_by: int, refunded_payment: bool, meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(201) {id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map], refunded_by: int, refunded_payment: bool, meta_data: [map]}
@errors {401, 404}

@endpoint GET /orders/{orderId}/refunds/{refundId}
@required {orderId: int, refundId: int}
@returns(200) {id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map], refunded_by: int, refunded_payment: bool, meta_data: [map]}
@errors {401, 404}

@endpoint DELETE /orders/{orderId}/refunds/{refundId}
@required {orderId: int, refundId: int, force: bool=true}
@returns(200) {id: int, reason: str, total: str, date_created: str(date-time), date_created_gmt: str(date-time), amount: str, api_refund: bool, line_items: [map], refunded_by: int, refunded_payment: bool, meta_data: [map]}
@errors {401, 404}

@endgroup

@group coupons
@endpoint GET /coupons
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str(date-time), before: str(date-time), exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/id/include/title/slug)=date, code: str}
@returns(200)
@errors {401}

@endpoint POST /coupons
@optional {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str(percent/fixed_cart/fixed_product)=fixed_cart, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool=false, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool=false, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool=false, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(201) {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}
@errors {400, 401}

@endpoint GET /coupons/{couponId}
@required {couponId: int}
@optional {context: str(view/edit)=view}
@returns(200) {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}
@errors {401, 404}

@endpoint PUT /coupons/{couponId}
@required {couponId: int}
@optional {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str(percent/fixed_cart/fixed_product)=fixed_cart, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool=false, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool=false, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool=false, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map{id: int, key: str, value: map, display_key: str, display_value: map}]}
@returns(200) {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}
@errors {400, 401, 404}

@endpoint DELETE /coupons/{couponId}
@required {couponId: int, force: bool=true}
@returns(200) {id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}
@errors {401, 404}

@endpoint POST /coupons/batch
@optional {create: [map{id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}], update: [map{id: int, code: str, amount: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time), discount_type: str, description: str, date_expires: str(date-time), date_expires_gmt: str(date-time), usage_count: int, individual_use: bool, product_ids: [int], excluded_product_ids: [int], usage_limit: int, usage_limit_per_user: int, limit_usage_to_x_items: int, free_shipping: bool, product_categories: [int], excluded_product_categories: [int], exclude_sale_items: bool, minimum_amount: str, maximum_amount: str, email_restrictions: [str], meta_data: [map]}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}
@errors {400, 401}

@endgroup

@group settings
@endpoint GET /settings
@returns(200)
@errors {401}

@endpoint GET /settings/{groupId}
@required {groupId: str}
@returns(200) {id: str, label: str, description: str, parent_id: str, sub_groups: str}
@errors {401, 404}

@endpoint GET /settings/{groupId}/{id}
@required {groupId: str, id: str}
@returns(200) {id: str, label: str, description: str, value: str, default: str, tip: str, type: str, options: map}
@errors {401, 404}

@endpoint PUT /settings/{groupId}/{id}
@required {groupId: str, id: str}
@optional {id: str, label: str, description: str, value: str, default: str, tip: str, type: str, options: map}
@returns(200) {id: str, label: str, description: str, value: str, default: str, tip: str, type: str, options: map}
@errors {400, 401, 404}

@endgroup

@group shipping
@endpoint GET /shipping/zones
@returns(200)
@errors {401}

@endpoint POST /shipping/zones
@optional {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@returns(201) {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@errors {400, 401}

@endpoint GET /shipping/zones/{id}
@required {id: int}
@returns(200) {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@errors {401, 404}

@endpoint PUT /shipping/zones/{id}
@required {id: int}
@optional {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@returns(200) {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@errors {400, 401, 404}

@endpoint DELETE /shipping/zones/{id}
@required {id: int, force: bool=true}
@returns(200) {id: int, name: str, order: int, _links: map{self: [map], collection: [map]}}
@errors {401, 404}

@endpoint GET /shipping/zones/{id}/locations
@required {id: int}
@returns(200)
@errors {401, 404}

@endpoint PUT /shipping/zones/{id}/locations
@required {id: int}
@returns(200)
@errors {400, 401, 404}

@endpoint GET /shipping/zones/{id}/methods
@required {id: int}
@returns(200)
@errors {401, 404}

@endpoint POST /shipping/zones/{id}/methods
@required {id: int}
@optional {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@returns(201) {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@errors {400, 401, 404}

@endpoint GET /shipping/zones/{id}/methods/{instanceId}
@required {id: int, instanceId: int}
@returns(200) {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@errors {401, 404}

@endpoint PUT /shipping/zones/{id}/methods/{instanceId}
@required {id: int, instanceId: int}
@optional {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@returns(200) {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@errors {400, 401, 404}

@endpoint DELETE /shipping/zones/{id}/methods/{instanceId}
@required {id: int, instanceId: int, force: bool=true}
@returns(200) {id: int, instance_id: int, title: str, order: int, enabled: bool, method_id: str, method_title: str, method_description: str, settings: map}
@errors {401, 404}

@endgroup

@group payment_gateways
@endpoint GET /payment_gateways
@returns(200)
@errors {401}

@endpoint GET /payment_gateways/{id}
@required {id: str}
@returns(200) {id: str, title: str, description: str, order: int, enabled: bool, method_title: str, method_description: str, method_supports: [str], settings: map}
@errors {401, 404}

@endpoint PUT /payment_gateways/{id}
@required {id: str}
@optional {id: str, title: str, description: str, order: int, enabled: bool, method_title: str, method_description: str, method_supports: [str], settings: map}
@returns(200) {id: str, title: str, description: str, order: int, enabled: bool, method_title: str, method_description: str, method_supports: [str], settings: map}
@errors {400, 401, 404}

@endgroup

@group taxes
@endpoint GET /taxes
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, exclude: [int], include: [int], offset: int, order: str(asc/desc)=asc, orderby: str(id/order)=id, class: str}
@returns(200)
@errors {401}

@endpoint POST /taxes
@optional {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int=1, compound: bool=false, shipping: bool=true, order: int=0, class: str=standard}
@returns(201) {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}
@errors {400, 401}

@endpoint GET /taxes/{id}
@required {id: int}
@optional {context: str(view/edit)=view}
@returns(200) {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}
@errors {401, 404}

@endpoint PUT /taxes/{id}
@required {id: int}
@optional {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int=1, compound: bool=false, shipping: bool=true, order: int=0, class: str=standard}
@returns(200) {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}
@errors {400, 401, 404}

@endpoint DELETE /taxes/{id}
@required {id: int, force: bool=true}
@returns(200) {id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}
@errors {401, 404}

@endpoint POST /taxes/batch
@optional {create: [map{id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}], update: [map{id: int, country: str, state: str, postcode: str, city: str, rate: str, name: str, priority: int, compound: bool, shipping: bool, order: int, class: str}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}
@errors {400, 401}

@endpoint GET /taxes/classes
@returns(200)
@errors {401}

@endpoint POST /taxes/classes
@optional {slug: str, name: str}
@returns(201) {slug: str, name: str}
@errors {400, 401}

@endpoint GET /taxes/classes/{slug}
@required {slug: str}
@returns(200) {slug: str, name: str}
@errors {401, 404}

@endpoint DELETE /taxes/classes/{slug}
@required {slug: str, force: bool=true}
@returns(200) {slug: str, name: str}
@errors {401, 404}

@endgroup

@group webhooks
@endpoint GET /webhooks
@optional {context: str(view/edit)=view, page: int=1, per_page: int=10, search: str, after: str(date-time), before: str(date-time), exclude: [int], include: [int], offset: int, order: str(asc/desc)=desc, orderby: str(date/id/include/title)=date, status: str(all/active/paused/disabled)}
@returns(200)
@errors {401}

@endpoint POST /webhooks
@optional {id: int, name: str, status: str(active/paused/disabled)=active, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@returns(201) {id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@errors {400, 401}

@endpoint GET /webhooks/{id}
@required {id: int}
@optional {context: str(view/edit)=view}
@returns(200) {id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@errors {401, 404}

@endpoint PUT /webhooks/{id}
@required {id: int}
@optional {id: int, name: str, status: str(active/paused/disabled)=active, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@returns(200) {id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@errors {400, 401, 404}

@endpoint DELETE /webhooks/{id}
@required {id: int, force: bool=true}
@returns(200) {id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}
@errors {401, 404}

@endpoint POST /webhooks/batch
@optional {create: [map{id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}], update: [map{id: int, name: str, status: str, topic: str, resource: str, event: str, hooks: [str], delivery_url: str(uri), secret: str, date_created: str(date-time), date_created_gmt: str(date-time), date_modified: str(date-time), date_modified_gmt: str(date-time)}], delete: [int]}
@returns(200) {create: [map], update: [map], delete: [map]}
@errors {400, 401}

@endgroup

@group system_status
@endpoint GET /system_status
@returns(200) {environment: map, database: map, active_plugins: [map], inactive_plugins: [map], dropins_mu_plugins: [map], theme: map, settings: map, security: map, pages: [map]}
@errors {401}

@endpoint GET /system_status/tools
@returns(200)
@errors {401}

@endpoint GET /system_status/tools/{id}
@required {id: str}
@returns(200) {id: str, name: str, action: str, description: str, success: bool, message: str}
@errors {401, 404}

@endpoint PUT /system_status/tools/{id}
@required {id: str}
@returns(200) {id: str, name: str, action: str, description: str, success: bool, message: str}
@errors {400, 401, 404}

@endgroup

@end
