Update product
PATCH
/v4/commerce/products/{productId}
const url = 'https://console.orangepill.cloud/v4/commerce/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"description":"example","image_url":"https://example.com","metadata":{"additionalProperty":"example"},"name":"example","status":"draft","tags":["example"],"type":"physical"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://console.orangepill.cloud/v4/commerce/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "image_url": "https://example.com", "metadata": { "additionalProperty": "example" }, "name": "example", "status": "draft", "tags": [ "example" ], "type": "physical" }'Update mutable fields on a product.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”productId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
description
string
image_url
string format: uri
metadata
object
key
additional properties
name
string
status
string
tags
Array<string>
type
string
Responses
Section titled “Responses”Updated product
Media typeapplication/json
object
data
required
object
created_at
required
string format: date-time
description
string
id
required
string format: uuid
image_url
string format: uri
metadata
object
key
additional properties
name
required
string
status
required
string
tags
required
Array<string>
tenant_id
required
string format: uuid
type
required
string
updated_at
required
string format: date-time
success
required
boolean
Example
{ "data": { "status": "draft", "type": "physical" }, "success": true}Not found
Media typeapplication/json
object
details
error
required
string
success
required
boolean
Example
{ "success": false}