Skip to main content

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

Authorization
string
required
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.
productType
string
required
Posibles valores: ‘DIGITAL’, ‘PHYSICAL’, ‘SERVICE’, ‘PHYSICAL/DIGITAL’
image
string
The URL for the product image.
statementDescriptor
string
default:"abcde"
The statement descriptor for the product.
availableInStore
boolean
default:"True"
Indicates whether the product is available in-store.
medias
object[]
An array of medias for the product.
variants
object[]
An array of variants for the product.
collectionIds
string[]
An array of category Ids for the product
isTaxesEnabled
boolean
default:"True"
Are there any taxes attached to the product. If this is true, taxes array cannot be empty.
taxes
string[]
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.
isLabelEnabled
boolean
default:"True"
Is the product label enabled. If this is true, label object cannot be empty.
label
object
Details for Product Label
slug
string
default:"awesome-product"
The slug using which the product navigation will be handled
seo
object
SEO data for the product that will be displayed in the preview
taxInclusive
boolean
default:"True"
Whether the taxes should be included in the purchase price

Respuestas

_id
string
default:"655b33a82209e60b6adb87a5"
required
The unique identifier for the product.
description
string
default:"This is a really awesome product"
product description
variants
object[]
An array of variants for the product.
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).
availableInStore
boolean
default:"True"
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.
statementDescriptor
string
default:"abcde"
The statement descriptor for the product.
image
string
The URL for the product image.
collectionIds
string[]
An array of category Ids for the product
isTaxesEnabled
boolean
default:"True"
The field indicates whether taxes are enabled for the product or not.
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
default:"65d71377c326ea78e1c47df5"
Tax category ID for Automatic taxes calculation.
label
object
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"
}
{}
{}
{}

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
}'