The "Create Price for a Product" API allows adding a new price associated with a specific product to the system. Use this endpoint to create a price with the specified details for a particular product. Ensure that the required information is provided in the request payload.

http
POST https://services.leadconnectorhq.com/products/{productId}/price

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
productIdstringYes6578278e879ad2646715ba9cID of the product that needs to be used

Body

NameTypeRequiredExampleDescription
namestringYesPrice NameThe name of the price.
typestringYesone_timeThe type of the price. Possible values: 'one_time', 'recurring'
currencystringYesUSDThe currency of the price.
amountnumberYes99.99The amount of the price. ( min: 0 )
recurringobjectNoThe recurring details of the price (if type is recurring).
descriptionstringNoA brief description of the price.
  • membershipOffers (object[]): An array of membership offers associated with the price.

    • label (string, required): Membership offer label Example: top_50

    • value (string, required): Membership offer label Example: 50

    • _id (string, required): The unique identifier for the membership offer. Example: 655b33aa2209e60b6adb87a7

NameTypeRequiredExampleDescription
trialPeriodnumberNo7The trial period duration in days (if applicable).
totalCyclesnumberNo12The total number of billing cycles for the price. ( min: 1 )
setupFeenumberNo10.99The setup fee for the price.
variantOptionIdsstring[]NoAn array of variant option IDs associated with the price.
compareAtPricenumberNo19.99The compare at price for the price.
locationIdstringYes6578278e879ad2646715ba9cThe unique identifier of the account associated with the price.
userIdstringNo6578278e879ad2646715ba9cThe unique identifier of the user who created the price.
metaobjectNoAdditional metadata associated with the price.
trackInventorybooleanNoTrueNeed to track inventory stock quantity
availableQuantitynumberNo5Available inventory stock quantity
allowOutOfStockPurchasesbooleanNoTrueContinue selling when out of stock
skustringNosku_123The unique identifier of the SKU associated with the price
shippingOptionsobjectNoShipping options of the Price
isDigitalProductbooleanNoTrueIs the product a digital product
digitalDeliverystring[]NoDigital delivery options

Responses

201 - Successful response
  • _id (string, required): The unique identifier for the price. Example: 655b33aa2209e60b6adb87a7

  • membershipOffers (object[]): An array of membership offers associated with the price.

    • label (string, required): Membership offer label Example: top_50

    • value (string, required): Membership offer label Example: 50

    • _id (string, required): The unique identifier for the membership offer. Example: 655b33aa2209e60b6adb87a7

  • variantOptionIds (string[]): An array of variant option IDs associated with the price.

  • locationId (string): The unique identifier for the account. Example: 3SwdhCsvxI8Au3KsPJt6

  • product (string): The unique identifier for the associated product. Example: 655b33a82209e60b6adb87a5

  • userId (string): The unique identifier for the user. Example: 6YAtzfzpmHAdj0e8GkKp

  • name (string, required): The name of the price. Example: Red / S

  • type (string, required): The type of the price (e.g., one_time). Possible values: 'one_time', 'recurring' Example: one_time

  • currency (string, required): The currency code for the price. Example: INR

  • amount (number, required): The amount of the price. Example: 199999

  • recurring (object): The recurring details of the price (if type is recurring).

  • createdAt (string): The creation timestamp of the price. Example: 2023-11-20T10:23:38.645Z

  • updatedAt (string): The last update timestamp of the price. Example: 2024-01-23T09:57:04.852Z

  • compareAtPrice (number): The compare-at price for comparison purposes. Example: 2000000

  • trackInventory (boolean): Indicates whether inventory tracking is enabled.

  • availableQuantity (number): Available inventory stock quantity Example: 5

  • allowOutOfStockPurchases (boolean): Continue selling when out of stock Example: True

json
{
  "_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,
  "createdAt": "2023-11-20T10:23:38.645Z",
  "updatedAt": "2024-01-23T09:57:04.852Z",
  "compareAtPrice": 2000000,
  "availableQuantity": 5,
  "allowOutOfStockPurchases": true
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/products/YOUR_productId/price' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Price Name",
  "type": "one_time",
  "currency": "USD",
  "amount": 99.99,
  "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",
  "trackInventory": true,
  "availableQuantity": 5,
  "allowOutOfStockPurchases": true,
  "sku": "sku_123",
  "isDigitalProduct": true,
  "digitalDelivery": [
    "string"
  ]
}'

Last updated October 26, 2026

Was this page helpful?