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

http
POST https://services.leadconnectorhq.com/products/

Authorization

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

Body

NameTypeRequiredExampleDescription
namestringYesAwesome ProductThe name of the product.
locationIdstringYes3SwdhCsvxI8Au3KsPJt6The unique identifier for the account.
descriptionstringNoProduct description goes here.A brief description of the product.
productTypestringYesPossible values: 'DIGITAL', 'PHYSICAL', 'SERVICE', 'PHYSICAL/DIGITAL'
imagestringNohttps://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.pngThe URL for the product image.
statementDescriptorstringNoabcdeThe statement descriptor for the product.
availableInStorebooleanNoTrueIndicates whether the product is available in-store.
  • medias (object[]): An array of medias for the product.

    • id (string, required): The unique identifier for the media. Example: fzrgusiuu0m

    • title (string): The title of the media file. Example: 1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png

    • url (string, required): The URL where the media file is stored. Example: https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png

    • type (string, required): The type of the media file (e.g., image, video will be supporting soon). Possible values: 'image', 'video' Example: image

    • isFeatured (boolean): Indicates whether the media is featured. Example: True

    • priceIds (array[]): Mongo ObjectIds of the prices for which the media is assigned Example: 6578278e879ad2646715ba9c

  • variants (object[]): An array of variants for the product.

    • id (string, required): A unique identifier for the variant. Example: 38s63qmxfr4

    • name (string, required): The name of the variant. Example: Size

    • options (object[], required): An array of options for the variant.

      • id (string, required): The unique identifier for the option. Example: h4z7u0im2q8

      • name (string, required): The name of the option. Example: XL

NameTypeRequiredExampleDescription
collectionIdsstring[]NoAn array of category Ids for the product
isTaxesEnabledbooleanNoTrueAre there any taxes attached to the product. If this is true, taxes array cannot be empty.
taxesstring[]NoList of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should be true.
automaticTaxCategoryIdstringNo65d71377c326ea78e1c47df5Tax category ID for Automatic taxes calculation.
isLabelEnabledbooleanNoTrueIs the product label enabled. If this is true, label object cannot be empty.
labelobjectNoDetails for Product Label
slugstringNoawesome-productThe slug using which the product navigation will be handled
seoobjectNoSEO data for the product that will be displayed in the preview
taxInclusivebooleanNoTrueWhether the taxes should be included in the purchase price

Responses

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

  • description (string): product description Example: This is a really awesome product

  • variants (object[]): An array of variants for the product.

    • id (string, required): A unique identifier for the variant. Example: 38s63qmxfr4

    • name (string, required): The name of the variant. Example: Size

    • options (object[], required): An array of options for the variant.

      • id (string, required): The unique identifier for the option. Example: h4z7u0im2q8

      • name (string, required): The name of the option. Example: XL

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

  • name (string, required): The name of the product. Example: Awesome Product

  • productType (string, required): The type of the product (e.g., PHYSICAL). Example: PHYSICAL

  • availableInStore (boolean): Indicates whether the product is available in-store. Example: True

  • createdAt (string, required): The creation timestamp of the product. Example: 2023-11-20T10:23:36.515Z

  • updatedAt (string, required): The last update timestamp of the product. Example: 2024-01-23T09:57:04.846Z

  • statementDescriptor (string): The statement descriptor for the product. Example: abcde

  • image (string): The URL for the product image. Example: https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png

  • collectionIds (string[]): An array of category Ids for the product

  • isTaxesEnabled (boolean): The field indicates whether taxes are enabled for the product or not. Example: True

  • taxes (string[]): An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type ProductTaxDto. Please refer to the ProductTaxDto for additional details.

  • automaticTaxCategoryId (string): Tax category ID for Automatic taxes calculation. Example: 65d71377c326ea78e1c47df5

  • label (object): The Product label details

  • slug (string): The slug of the product by which the product will be navigated Example: washing-machine

json
{
  "_id": "655b33a82209e60b6adb87a5",
  "description": "This is a really awesome product",
  "variants": [
    {
      "id": "38s63qmxfr4",
      "name": "Size",
      "options": [
        {}
      ]
    }
  ],
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "name": "Awesome Product",
  "productType": "PHYSICAL",
  "availableInStore": true,
  "createdAt": "2023-11-20T10:23:36.515Z",
  "updatedAt": "2024-01-23T09:57:04.846Z",
  "statementDescriptor": "abcde",
  "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "slug": "washing-machine"
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/products/' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "productType": "DIGITAL",
  "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
  "statementDescriptor": "abcde",
  "availableInStore": true,
  "medias": [
    {
      "id": "fzrgusiuu0m",
      "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png",
      "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png",
      "type": "image",
      "isFeatured": true,
      "priceIds": "6578278e879ad2646715ba9c"
    }
  ],
  "variants": [
    {
      "id": "38s63qmxfr4",
      "name": "Size",
      "options": [
        {}
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "slug": "awesome-product",
  "taxInclusive": true
}'

Last updated October 26, 2026

Was this page helpful?