younifyd
Menu

Update Product By Id

This API lets you make changes to a product.

PUT/products/{productId}

Use it in a workflow

  1. Add a step and choose the WooCommerce connector.
  2. Pick the Update Product By Id action (under Products).
  3. Fill in the fields below, then reference the result from later steps as {{updateProductById.response.data}}.

Request

Path parameters

productIdintegerrequired

ID of product to update

Request body

Enter the body as JSON in the step's Body field.

idinteger

Unique identifier for the resource. read-only

namestring

Product name.

slugstring

Product slug.

permalinkstring

Product URL. read-only

date_createdstring (date-time)

The date the product was created, in the site's timezone. read-only

date_created_gmtstring (date-time)

The date the product was created, as GMT. read-only

date_modifiedstring (date-time)

The date the product was last modified, in the site's timezone. read-only

date_modified_gmtstring (date-time)

The date the product was last modified, as GMT. read-only

typestring

Product type. Options: simple, grouped, external and variable. Default is simple.

statusstring

Product status (post status). Options: draft, pending, private and publish. Default is publish.

featuredboolean

Featured product. Default is false.

catalog_visibilitystring

Catalog visibility. Options: visible, catalog, search and hidden. Default is visible.

descriptionstring

Product description.

short_descriptionstring

Product short description.

skustring

Unique identifier.

pricestring

Current product price. read-only

regular_pricestring

Regular product price.

sale_pricestring

Product sale price.

date_on_sale_fromstring (date-time)

Start date of sale price, in the site's timezone.

date_on_sale_from_gmtstring (date-time)

Start date of sale price, as GMT.

date_on_sale_tostring (date-time)

End date of sale price, in the site's timezone.

date_on_sale_to_gmtstring (date-time)

End date of sale price, as GMT.

price_htmlstring

Price formatted in HTML. read-only

on_saleboolean

Shows if the product is on sale. read-only

purchasableboolean

Shows if the product can be bought. read-only

total_salesinteger (int64)

Amount of sales. read-only

virtualboolean

If the product is virtual. Default is false.

downloadableboolean

If the product is downloadable. Default is false.

downloadsarray<object>

List of downloadable files.

idstring

File ID.

namestring

File name.

filestring

File URL.

download_limitinteger

Number of times downloadable files can be downloaded after purchase. Default is -1.

download_expiryinteger

Number of days until access to downloadable files expires. Default is -1.

external_urlstring

Product external URL. Only for external products.

button_textstring

Product external button text. Only for external products.

tax_statusstring

Tax status. Options: taxable, shipping and none. Default is taxable.

tax_classstring

Tax class.

manage_stockboolean

Stock management at product level. Default is false.

stock_quantityinteger

Stock quantity.

stock_statusstring

Controls the stock status of the product. Options: instock, outofstock, onbackorder. Default is instock.

backordersstring

If managing stock, this controls if backorders are allowed. Options: no, notify and yes. Default is no.

backorders_allowedboolean

Shows if backorders are allowed. read-only

json
{
  "id": 0,
  "name": "string",
  "slug": "string",
  "permalink": "string",
  "date_created": "2025-01-01T00:00:00Z",
  "date_created_gmt": "2025-01-01T00:00:00Z",
  "date_modified": "2025-01-01T00:00:00Z",
  "date_modified_gmt": "2025-01-01T00:00:00Z",
  "type": "string",
  "status": "string",
  "featured": false,
  "catalog_visibility": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{updateProductById.response.data.<field>}}.

idinteger

Unique identifier for the resource. read-only

namestring

Product name.

slugstring

Product slug.

permalinkstring

Product URL. read-only

date_createdstring (date-time)

The date the product was created, in the site's timezone. read-only

date_created_gmtstring (date-time)

The date the product was created, as GMT. read-only

date_modifiedstring (date-time)

The date the product was last modified, in the site's timezone. read-only

date_modified_gmtstring (date-time)

The date the product was last modified, as GMT. read-only

typestring

Product type. Options: simple, grouped, external and variable. Default is simple.

statusstring

Product status (post status). Options: draft, pending, private and publish. Default is publish.

featuredboolean

Featured product. Default is false.

catalog_visibilitystring

Catalog visibility. Options: visible, catalog, search and hidden. Default is visible.

descriptionstring

Product description.

short_descriptionstring

Product short description.

skustring

Unique identifier.

pricestring

Current product price. read-only

regular_pricestring

Regular product price.

sale_pricestring

Product sale price.

date_on_sale_fromstring (date-time)

Start date of sale price, in the site's timezone.

date_on_sale_from_gmtstring (date-time)

Start date of sale price, as GMT.

date_on_sale_tostring (date-time)

End date of sale price, in the site's timezone.

date_on_sale_to_gmtstring (date-time)

End date of sale price, as GMT.

price_htmlstring

Price formatted in HTML. read-only

on_saleboolean

Shows if the product is on sale. read-only

purchasableboolean

Shows if the product can be bought. read-only

total_salesinteger (int64)

Amount of sales. read-only

virtualboolean

If the product is virtual. Default is false.

downloadableboolean

If the product is downloadable. Default is false.

downloadsarray<object>

List of downloadable files.

idstring

File ID.

namestring

File name.

filestring

File URL.

download_limitinteger

Number of times downloadable files can be downloaded after purchase. Default is -1.

download_expiryinteger

Number of days until access to downloadable files expires. Default is -1.

external_urlstring

Product external URL. Only for external products.

button_textstring

Product external button text. Only for external products.

tax_statusstring

Tax status. Options: taxable, shipping and none. Default is taxable.

tax_classstring

Tax class.

manage_stockboolean

Stock management at product level. Default is false.

stock_quantityinteger

Stock quantity.

stock_statusstring

Controls the stock status of the product. Options: instock, outofstock, onbackorder. Default is instock.

backordersstring

If managing stock, this controls if backorders are allowed. Options: no, notify and yes. Default is no.

backorders_allowedboolean

Shows if backorders are allowed. read-only

json
{
  "id": 0,
  "name": "string",
  "slug": "string",
  "permalink": "string",
  "date_created": "2025-01-01T00:00:00Z",
  "date_created_gmt": "2025-01-01T00:00:00Z",
  "date_modified": "2025-01-01T00:00:00Z",
  "date_modified_gmt": "2025-01-01T00:00:00Z",
  "type": "string",
  "status": "string",
  "featured": false,
  "catalog_visibility": "string"
}

Need more? See the WooCommerce guide for connection setup and behaviour shared by every action.