Update SKU by ID
PUT https://{handle}.myshopline.com/admin/openapi/v20220601/products/variants/:variant_id.json
handle
: The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com
, the store handle is open001
.Update SKU
Path Parameters
- variant_id string requiredskuID
Request Headers
- Content-Type requiredThe value of this field is fixed to
application/json; charset=utf-8
- Authorization string requiredThe access token for the API. Please refer to App authorization to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
variantobject
Variant informationbarcode stringBarcode, limited to 100 characterscompare_at_price stringOriginal priceimageobject
Imagesalt stringAlt information of the picture , limited to 255 characterssrc stringCorresponding img src link, limited to 255 charactersinventory_policy stringAllows oversold ( deny ) to be oversold and continue to be allowedinventory_quantity integerInventory quantity, min -999999, max 999999inventory_tracker booleanTracking : true、 does not track : false , default not trackingoption1 stringCorresponding option1 value , limited to 255 charactersoption2 stringCorresponding option2 value , limited to 255 charactersoption3 stringCorresponding option3 value , limited to 255 charactersoption4 stringCorresponding option4 value , limited to 255 charactersoption5 stringCorresponding option5 value , limited to 255 charactersprice stringSelling pricesku stringSku code , length can not exceed 100weight stringWeightweight_unit stringWeight units
Response
- 200
- 401
- 429
For more information about status codes, see Http status code.
Response Headers
traceId
traceId
Response Body
variantobject
Variant informationbarcode stringBar codecompare_at_price stringOriginal pricecreated_at stringCreation timeid stringidimageobject
Imagesalt stringPicture altsrc stringImages srcinventory_item_id stringStock object idinventory_policy stringAllows oversold ( deny ) to be oversold and continue to be allowedinventory_quantity integerInventory quantityinventory_tracker booleanTracking : true、 does not track : false , default not trackingoption1 stringOption1 valueoption2 stringOption2 valueoption3 stringValue of option3option4 stringOption4 valueoption5 stringOption5 valueprice stringSelling priceproduct_id stringProduct IDsku stringSkuupdated_at stringUpdate timeweight stringWeightweight_unit stringWeight units
API Explorer
Debugger
Was this article helpful to you?
Error loading component.