Documentation Index Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt
Use this file to discover all available pages before exploring further.
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.
POST https://services.leadconnectorhq.com/products/
Autorizacion
Bearer token generado desde el portal Leadway. Ver Autenticacion .
Version
string
default: "2021-07-28"
required
Version de la API.
Body
name
string
default: "Awesome Product"
required
The name of the product.
locationId
string
default: "3SwdhCsvxI8Au3KsPJt6"
required
The unique identifier for the account.
description
string
default: "Product description goes here."
A brief description of the product.
Posibles valores: ‘DIGITAL’, ‘PHYSICAL’, ‘SERVICE’, ‘PHYSICAL/DIGITAL’
The URL for the product image.
The statement descriptor for the product.
Indicates whether the product is available in-store.
An array of medias for the product. id
string
default: "fzrgusiuu0m"
required
The unique identifier for the media.
title
string
default: "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png"
The title of the media file.
The URL where the media file is stored.
type
string
default: "image"
required
The type of the media file (e.g., image, video will be supporting soon). Posibles valores: ‘image’, ‘video’
Indicates whether the media is featured.
priceIds
array[]
default: "6578278e879ad2646715ba9c"
Mongo ObjectIds of the prices for which the media is assigned
An array of variants for the product. id
string
default: "38s63qmxfr4"
required
A unique identifier for the variant.
name
string
default: "Size"
required
The name of the variant.
An array of options for the variant. id
string
default: "h4z7u0im2q8"
required
The unique identifier for the option.
name
string
default: "XL"
required
The name of the option.
An array of category Ids for the product
Are there any taxes attached to the product. If this is true, taxes array cannot be empty.
List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should be true.
automaticTaxCategoryId
string
default: "65d71377c326ea78e1c47df5"
Tax category ID for Automatic taxes calculation.
Is the product label enabled. If this is true, label object cannot be empty.
Details for Product Label
slug
string
default: "awesome-product"
The slug using which the product navigation will be handled
SEO data for the product that will be displayed in the preview
Whether the taxes should be included in the purchase price
Respuestas
201 - Successful response
_id
string
default: "655b33a82209e60b6adb87a5"
required
The unique identifier for the product.
description
string
default: "This is a really awesome product"
product description
An array of variants for the product. id
string
default: "38s63qmxfr4"
required
A unique identifier for the variant.
name
string
default: "Size"
required
The name of the variant.
An array of options for the variant. id
string
default: "h4z7u0im2q8"
required
The unique identifier for the option.
name
string
default: "XL"
required
The name of the option.
locationId
string
default: "3SwdhCsvxI8Au3KsPJt6"
required
The unique identifier for the account.
name
string
default: "Awesome Product"
required
The name of the product.
productType
string
default: "PHYSICAL"
required
The type of the product (e.g., PHYSICAL).
Indicates whether the product is available in-store.
createdAt
string
default: "2023-11-20T10:23:36.515Z"
required
The creation timestamp of the product.
updatedAt
string
default: "2024-01-23T09:57:04.846Z"
required
The last update timestamp of the product.
The statement descriptor for the product.
The URL for the product image.
An array of category Ids for the product
The field indicates whether taxes are enabled for the product or not.
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
default: "65d71377c326ea78e1c47df5"
Tax category ID for Automatic taxes calculation.
The Product label details
slug
string
default: "washing-machine"
The slug of the product by which the product will be navigated
{
"_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"
}
422 - Unprocessable Entity
Ejemplo
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
}'