Update Product Variant
PUT/commerce/products/:productId/variants/:variantId
Update product variant for a specified user and credential set
Request
Path Parameters
productId stringrequired
ID of the product which the variant will be added to
variantId stringrequired
The variant id
Query Parameters
credentialId stringrequired
The ID of the credential.
Header Parameters
Authorization stringrequired
Default value: bearer YOUR_API_KEY
- application/json
Body
Array [
]
price double
The price of the variant.
sku string
The SKU (stock-keeping unit) of the variant.
optionValues
object[]
An array of objects containing the option name and value for the variant.
name stringrequired
value stringrequired
weight
object
An object containing the weight value and unit of measure for the variant.
value stringrequired
unit stringrequired
remoteFields json
An object containing remote fields that are not supported by the common model. The keys are the names of the fields of the corresponding resource in the remote app, and the values can be strings, numbers, arrays or objects.
Responses
- 200
- 400
200
- application/json
- Schema
- Result
Schema
any
{
"variant": {
"remoteId": "200100200100",
"productId": "00112233-4455-6677-8899-aabbccddeeff",
"remoteCreatedAt": "2023-11-19T17:00:17.000Z",
"remoteUpdatedAt": "2023-11-19T17:00:17.000Z",
"remoteDeleted": false,
"createdAt": "2024-02-22T11:17:53.264Z",
"updatedAt": "2024-02-22T13:54:03.445Z"
"title": "Medium",
"price": "25.00",
"sku": "SHIRT-M",
"optionValues": [
{
"name": "Size",
"value": "Medium"
}
],
"inventory": {"totalCount": 50},
"weight": [
{
"value": 9.525451098148434,
"unit": "kg"
},
{
"value": 9525.451098148435,
"unit": "g"
},
{
"value": 336.00076203608785,
"unit": "oz"
},
{
"value": 20.999999999999996,
"unit": "lb"
}
],
"id": "11001100-1122-3344-5566-77889900aabb"
}
}
400
- application/json
- Schema
- Example (from schema)
- Result
Schema
object
{}
{}
Loading...