- 1Merchant API
- Welcome 👋
- Get Started
- 水合失败
- Authorization
- Webhooks
- Conditional Webhooks
- Security Considerations
- Multi-Language Support
- Responses
- Pagination
- Rate Limiting
- Versioning
- Change Log
- Support
- 测试
- APIs
- Orders
- Order Status
- Order Histories
- Abandoned Carts
- Order Tags
- Order Invoice
- Order Reservations
- Order Items
- Products
- Product Options
- Product Quantity
- Product Variants
- Product Tags
- Product Images
- Product Option Values
- Customer Groups
- Customers
- Digitals Product
- Categories
- Exports
- Shipments
- Shipping Companies
- Shipping Zones
- Shipping Rules
- Countries
- Product Option Templates
- Taxes
- Coupons
- Affiliates
- Order Assignment
- Special Offers
- Transactions
- Payments
- Settlements
- Settings
- Merchant
- Brands
- Reviews
- Branches
- Currencies
- SEO
- Cities
- DNS Records
- Languages
- Employees
- Advertisements
- Webhooks
- Custom URLs
- Loyalty Points
- Orders
- Webhooks - Store Events
- 其他资源-Module
- 其他资源 Copy
- 2Partner Apps APIs
- 3Shipping and Fulfilment API
- 4Twilight Themes
- Getting Started
- Requirements & Review
- Files and Folders Structure
- Twig Template Engine
- Theme Architecture
- Layouts
- Pages
- Componenets
- Overview
- Home Components
- Youtube
- Fixed banner
- Testimonials
- Parallax background
- Photos slider
- Store features
- Square photos
- Fixed products
- Products slider
- Featured products - Style 1
- Featured Products - Style 2
- Featured Products - Style 3
- Brands
- Enhanced Square Banners
- Main Links
- Enhanced Slider
- Slider Products with Headers
- Latest Products
- Vertical Menu with Slider
- Product Components
- Common Components
- Change Log
- 5Twilight JS SDK
- 6Twilight Web Components
- 7Salla CLI
- 8[ Internal ] Apps APIs
- 9[Internal] AI Services APIs
- 10这是一个长长长长长长长长长长长长的文件夹
- 11这是一个长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长的文件夹 Copy
Update Product Variant
Develop Env
https://echo.apifox.com/anything
Develop Env
https://echo.apifox.com/anything
PUT
https://echo.apifox.com/anything
Product Variants
Last modified:2025-02-20 07:53:20
Maintainer:Not configured
variant
as a path parameter.Important
Scopes
products.read_write
- Products Read & WriteRequest
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Path Params
variant
integer
required
Example:
652911549
Query Params
sku
string
optional
barcode
string
optional
price
number
optional
sale_price
number
optional
cost_price
string
optional
stock_quantity
string
optional
Body Params application/json
sku
string
optional
Example:
23-TD23-32
barcode
string
optional
Example:
abc01
price
number
optional
Example:
96.33
sale_price
number
optional
Example:
90.5
cost_price
number
optional
Example:
100.33
stock_quantity
number
optional
Example:
4
weight
number
optional
Example:
3
mpn
number
optional
Example:
43242342
gtin
number
optional
product_type
is set to any of the following: product
, group_products
, codes
, digital
, donating
then value can be set. Otherwise, it can be set to null
Example:
54353453
notify_low
integer
optional
Example
{
"sku": "23-TD23-32",
"barcode": "abc01",
"price": 96.33,
"sale_price": 90.5,
"cost_price": 100.33,
"stock_quantity": 4,
"weight": 3,
"mpn": 43242342,
"gtin": 54353453
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://echo.apifox.com/anything/products/variants/652911549' \
--header 'Content-Type: application/json' \
--data-raw '{
"sku": "23-TD23-32",
"barcode": "abc01",
"price": 96.33,
"sale_price": 90.5,
"cost_price": 100.33,
"stock_quantity": 4,
"weight": 3,
"mpn": 43242342,
"gtin": 54353453
}'
Responses
🟢201Updated Successfully
application/json
Body
status
number
optional
success
boolean
optional
data
object (ProductVariant)
optional
id
number
required
price
object
required
regular_price
object
required
cost_price
object
required
sale_price
object
required
has_special_price
boolean
read-onlyrequired
stock_quantity
integer
required
Example:
4
unlimited_quantity
boolean
required
notify_low
integer
required
barcode
string
required
Example:
abc01
sku
string
required
Example:
23-TD23-32
mpn
string
required
gtin
string
required
product_type
is set to any of the following: product
, group_products
, codes
, digital
, donating
then value can be set. Otherwise, it can be set to null
updated_at
object (Date)
required
related_options
array[integer]
required
related_option_values
array[integer]
required
weight
number
required
Example:
3
weight_type
string
required
Example:
kg
weight_label
string
required
Example:
٣ كجم
is_user_subscribed_to_sku
boolean
read-onlyrequired
is_default
boolean
required
Example
{
"status": 201,
"success": true,
"data": {
"id": 652911549,
"price": {
"amount": 13.5,
"currency": "SAR"
},
"sale_price": {
"amount": 0,
"currency": "SAR"
},
"cost_price": {
"amount": 0,
"currency": "SAR"
},
"stock_quantity": 3000,
"barcode": "barcode-ABC",
"sku": "sku-variant-1551119600",
"related_option_values": [
667315336
]
}
}
🟠404Not Found
🟠422Error Validation
🟠401Unauthorized

扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

