Update Price by ID for a Product
PUT/products/:productId/price/:priceId
The "Update Price by ID for a Product" API allows modifying information for a specific price associated with a particular product using its unique identifier. Use this endpoint to update details for a single price based on the provided price ID and product ID.
Request
API Version
v3ID of the product that needs to be used
ID of the price that needs to be returned
- application/json
- Body
- Example (auto)
Bodyrequired
The name of the price.
The type of the price.
one_timerecurringThe currency of the price.
The amount of the price. ( min: 0 )
The recurring details of the price (if type is recurring).
A brief description of the price.
An array of membership offers associated with the price.
The trial period duration in days (if applicable).
The total number of billing cycles for the price. ( min: 1 )
The setup fee for the price.
An array of variant option IDs associated with the price.
The compare at price for the price.
The unique identifier of the location associated with the price.
The unique identifier of the user who created the price.
Additional metadata associated with the price.
Need to track inventory stock quantity
Available inventory stock quantity
Continue selling when out of stock
The unique identifier of the SKU associated with the price
Shipping options of the Price
Is the product a digital product
Digital delivery options
{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"recurring": {
"interval": "day",
"intervalCount": 1
},
"description": "string",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"trialPeriod": 7,
"totalCycles": 12,
"setupFee": 10.99,
"variantOptionIds": [
"option_id_1",
"option_id_2"
],
"compareAtPrice": 19.99,
"locationId": "6578278e879ad2646715ba9c",
"userId": "6578278e879ad2646715ba9c",
"meta": {
"source": "stripe",
"sourceId": "123",
"stripePriceId": "price_123",
"internalSource": "agency_plan"
},
"trackInventory": true,
"availableQuantity": 5,
"allowOutOfStockPurchases": true,
"sku": "sku_123",
"shippingOptions": {
"weight": {
"value": 10,
"unit": "kg"
},
"dimensions": {
"height": 10,
"width": 10,
"length": 10,
"unit": "cm"
}
},
"isDigitalProduct": true,
"digitalDelivery": [
"string"
]
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
The unique identifier for the price.
An array of membership offers associated with the price.
An array of variant option IDs associated with the price.
The unique identifier for the location.
The unique identifier for the associated product.
The unique identifier for the user.
The name of the price.
The type of the price (e.g., one_time).
one_timerecurringThe currency code for the price.
The amount of the price.
The recurring details of the price (if type is recurring).
The creation timestamp of the price.
The last update timestamp of the price.
The compare-at price for comparison purposes.
Indicates whether inventory tracking is enabled.
Available inventory stock quantity
Continue selling when out of stock
{
"_id": "655b33aa2209e60b6adb87a7",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"recurring": {
"interval": "day",
"intervalCount": 1
},
"createdAt": "2023-11-20T10:23:38.645Z",
"updatedAt": "2024-01-23T09:57:04.852Z",
"compareAtPrice": 2000000,
"trackInventory": null,
"availableQuantity": 5,
"allowOutOfStockPurchases": true
}