Admin api products
Update product variant
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*integer
Id of the product variant
Request Body
application/json
name?string
weight?number
Range
0 <= valuebarcodes?array<>
List of barcodes, associated with a variant
isDefault?boolean
Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times.
thumbnail?string
invalidThumbnail?boolean
Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved
externalId?string
Client defined product variant identifier
Length
length <= 255Response Body
application/json
application/json
curl -X PATCH "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/products/variants/0" \ -H "Content-Type: application/json" \ -d '{}'{
"id": 0,
"name": "string",
"thumbnail": "string",
"invalidThumbnail": true,
"externalId": "string",
"weight": "string",
"barcodes": [
{
"isDefault": true,
"barcode": "string"
}
],
"isDefault": true,
"productId": 0
}Empty
{
"message": "Invalid request body",
"type": "E_INVALID_BODY",
"errors": [
{
"error": "\"email\" is required",
"rule": "any.required",
"field": "\"email\""
}
]
}How is this guide?