Update Price by ID for a Product
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.
PUT
/
products
/
{productId}
/
price
/
{priceId}
Update Price by ID for a Product
curl --request PUT \
--url https://services.leadconnectorhq.com/products/{productId}/price/{priceId} \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"trackInventory": true,
"availableQuantity": 5,
"allowOutOfStockPurchases": true,
"sku": "sku_123",
"shippingOptions": {},
"isDigitalProduct": true,
"digitalDelivery": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Price Name',
type: 'one_time',
currency: 'USD',
amount: 99.99,
locationId: '6578278e879ad2646715ba9c',
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,
userId: '6578278e879ad2646715ba9c',
trackInventory: true,
availableQuantity: 5,
allowOutOfStockPurchases: true,
sku: 'sku_123',
shippingOptions: {},
isDigitalProduct: true,
digitalDelivery: ['<string>']
})
};
fetch('https://services.leadconnectorhq.com/products/{productId}/price/{priceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/products/{productId}/price/{priceId}"
payload = {
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"trackInventory": True,
"availableQuantity": 5,
"allowOutOfStockPurchases": True,
"sku": "sku_123",
"shippingOptions": {},
"isDigitalProduct": True,
"digitalDelivery": ["<string>"]
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"_id": "655b33aa2209e60b6adb87a7",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"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
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Path Parameters
Body
application/json
Response
Successful response
Last modified on March 8, 2026
Was this page helpful?
Update Price by ID for a Product
curl --request PUT \
--url https://services.leadconnectorhq.com/products/{productId}/price/{priceId} \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"trackInventory": true,
"availableQuantity": 5,
"allowOutOfStockPurchases": true,
"sku": "sku_123",
"shippingOptions": {},
"isDigitalProduct": true,
"digitalDelivery": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Price Name',
type: 'one_time',
currency: 'USD',
amount: 99.99,
locationId: '6578278e879ad2646715ba9c',
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,
userId: '6578278e879ad2646715ba9c',
trackInventory: true,
availableQuantity: 5,
allowOutOfStockPurchases: true,
sku: 'sku_123',
shippingOptions: {},
isDigitalProduct: true,
digitalDelivery: ['<string>']
})
};
fetch('https://services.leadconnectorhq.com/products/{productId}/price/{priceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/products/{productId}/price/{priceId}"
payload = {
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"trackInventory": True,
"availableQuantity": 5,
"allowOutOfStockPurchases": True,
"sku": "sku_123",
"shippingOptions": {},
"isDigitalProduct": True,
"digitalDelivery": ["<string>"]
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"_id": "655b33aa2209e60b6adb87a7",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"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
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}