curl --request PUT \
--url https://services.leadconnectorhq.com/products/{productId}/price/{priceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"meta": {
"source": "stripe",
"stripePriceId": "price_123",
"internalSource": "agency_plan",
"sourceId": "123"
},
"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>"
]
}
'{
"_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
}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.
curl --request PUT \
--url https://services.leadconnectorhq.com/products/{productId}/price/{priceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"locationId": "6578278e879ad2646715ba9c",
"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,
"userId": "6578278e879ad2646715ba9c",
"meta": {
"source": "stripe",
"stripePriceId": "price_123",
"internalSource": "agency_plan",
"sourceId": "123"
},
"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>"
]
}
'{
"_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
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-07-28 ID of the product that needs to be used
"6578278e879ad2646715ba9c"
ID of the price that needs to be returned
"6578278e879ad2646715ba9c"
The name of the price.
"Price Name"
The type of the price.
one_time, recurring "one_time"
The currency of the price.
"USD"
The amount of the price. ( min: 0 )
99.99
The unique identifier of the location associated with the price.
"6578278e879ad2646715ba9c"
Show child attributes
A brief description of the price.
An array of membership offers associated with the price.
Show child attributes
The trial period duration in days (if applicable).
7
The total number of billing cycles for the price. ( min: 1 )
12
The setup fee for the price.
10.99
An array of variant option IDs associated with the price.
["option_id_1", "option_id_2"]The compare at price for the price.
19.99
The unique identifier of the user who created the price.
"6578278e879ad2646715ba9c"
Show child attributes
Need to track inventory stock quantity
true
Available inventory stock quantity
5
Continue selling when out of stock
true
The unique identifier of the SKU associated with the price
"sku_123"
Show child attributes
Is the product a digital product
true
Digital delivery options
Successful response
The unique identifier for the price.
"655b33aa2209e60b6adb87a7"
The name of the price.
"Red / S"
The type of the price (e.g., one_time).
one_time, recurring "one_time"
The currency code for the price.
"INR"
The amount of the price.
199999
An array of membership offers associated with the price.
Show child attributes
An array of variant option IDs associated with the price.
["h4z7u0im2q8", "h3nst2ltsnn"]The unique identifier for the location.
"3SwdhCsvxI8Au3KsPJt6"
The unique identifier for the associated product.
"655b33a82209e60b6adb87a5"
The unique identifier for the user.
"6YAtzfzpmHAdj0e8GkKp"
Show child attributes
The creation timestamp of the price.
"2023-11-20T10:23:38.645Z"
The last update timestamp of the price.
"2024-01-23T09:57:04.852Z"
The compare-at price for comparison purposes.
2000000
Indicates whether inventory tracking is enabled.
null
Available inventory stock quantity
5
Continue selling when out of stock
true
Was this page helpful?