# Create Product

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

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.

## Authentication

Send `Authorization: Bearer <token>` using any one of:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `products.write`
- **Agency token: OAuth access token or Private Integration Token.** Scopes: `products.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/products/": {
      "post": {
        "summary": "Create Product",
        "operationId": "createProduct",
        "description": "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.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProductResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "products.write"
            ]
          },
          {
            "Agency-Access": [
              "products.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CreateProductDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the product.",
            "example": "Awesome Product"
          },
          "locationId": {
            "type": "string",
            "description": "The unique identifier for the location.",
            "example": "3SwdhCsvxI8Au3KsPJt6"
          },
          "description": {
            "type": "string",
            "description": "A brief description of the product.",
            "example": "Product description goes here."
          },
          "productType": {
            "type": "string",
            "enum": [
              "DIGITAL",
              "PHYSICAL",
              "SERVICE",
              "PHYSICAL/DIGITAL"
            ]
          },
          "image": {
            "type": "string",
            "description": "The URL for the product image.",
            "example": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png"
          },
          "statementDescriptor": {
            "type": "string",
            "description": "The statement descriptor for the product.",
            "example": "abcde"
          },
          "availableInStore": {
            "type": "boolean",
            "description": "Indicates whether the product is available in-store.",
            "example": true
          },
          "medias": {
            "description": "An array of medias for the product.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The unique identifier for the media.",
                  "example": "fzrgusiuu0m"
                },
                "title": {
                  "type": "string",
                  "description": "The title of the media file.",
                  "example": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png"
                },
                "url": {
                  "type": "string",
                  "description": "The URL where the media file is stored.",
                  "example": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png"
                },
                "type": {
                  "type": "string",
                  "description": "The type of the media file (e.g., image, video will be supporting soon).",
                  "example": "image",
                  "enum": [
                    "image",
                    "video"
                  ]
                },
                "isFeatured": {
                  "type": "boolean",
                  "description": "Indicates whether the media is featured.",
                  "example": true
                },
                "priceIds": {
                  "description": "Mongo ObjectIds of the prices for which the media is assigned",
                  "example": "6578278e879ad2646715ba9c",
                  "type": "array",
                  "items": {
                    "type": "array"
                  }
                }
              },
              "required": [
                "id",
                "url",
                "type"
              ],
              "title": "ProductMediaDto"
            }
          },
          "variants": {
            "description": "An array of variants for the product.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "A unique identifier for the variant.",
                  "example": "38s63qmxfr4"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the variant.",
                  "example": "Size"
                },
                "options": {
                  "description": "An array of options for the variant.",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The unique identifier for the option.",
                        "example": "h4z7u0im2q8"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the option.",
                        "example": "XL"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "title": "ProductVariantOptionDto"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "options"
              ],
              "title": "ProductVariantDto"
            }
          },
          "collectionIds": {
            "description": "An array of category Ids for the product",
            "example": [
              "65d71377c326ea78e1c47df5",
              "65d71377c326ea78e1c47d34"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isTaxesEnabled": {
            "type": "boolean",
            "description": "Are there any taxes attached to the product. If this is true, taxes array cannot be empty.",
            "example": true,
            "default": false
          },
          "taxes": {
            "description": "List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should be true.",
            "example": [
              "654492a4e6bef380114de15a"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "automaticTaxCategoryId": {
            "type": "string",
            "description": "Tax category ID for Automatic taxes calculation.",
            "example": "65d71377c326ea78e1c47df5"
          },
          "isLabelEnabled": {
            "type": "boolean",
            "description": "Is the product label enabled. If this is true, label object cannot be empty.",
            "example": true,
            "default": false
          },
          "label": {
            "description": "Details for Product Label",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The content for the product label.",
                    "example": "Featured"
                  },
                  "startDate": {
                    "type": "string",
                    "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                    "example": "2024-06-26T05:43:35.000Z"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                    "example": "2024-06-30T05:43:39.000Z"
                  }
                },
                "required": [
                  "title"
                ],
                "title": "ProductLabelDto"
              }
            ]
          },
          "slug": {
            "type": "string",
            "description": "The slug using which the product navigation will be handled",
            "example": "awesome-product"
          },
          "seo": {
            "description": "SEO data for the product that will be displayed in the preview",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "SEO title",
                    "example": "Best Product - Buy Now"
                  },
                  "description": {
                    "type": "string",
                    "description": "SEO description",
                    "example": "This is the best product you can buy online with amazing features and great value"
                  }
                },
                "title": "ProductSEODto"
              }
            ]
          },
          "taxInclusive": {
            "type": "boolean",
            "description": "Whether the taxes should be included in the purchase price",
            "example": true,
            "default": false
          }
        },
        "required": [
          "name",
          "locationId",
          "productType"
        ],
        "title": "CreateProductDto"
      },
      "CreateProductResponseDto": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "The unique identifier for the product.",
            "example": "655b33a82209e60b6adb87a5"
          },
          "description": {
            "type": "string",
            "description": "product description",
            "example": "This is a really awesome product"
          },
          "variants": {
            "description": "An array of variants for the product.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "A unique identifier for the variant.",
                  "example": "38s63qmxfr4"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the variant.",
                  "example": "Size"
                },
                "options": {
                  "description": "An array of options for the variant.",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The unique identifier for the option.",
                        "example": "h4z7u0im2q8"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the option.",
                        "example": "XL"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "title": "ProductVariantOptionDto"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "options"
              ],
              "title": "ProductVariantDto"
            }
          },
          "locationId": {
            "type": "string",
            "description": "The unique identifier for the location.",
            "example": "3SwdhCsvxI8Au3KsPJt6"
          },
          "name": {
            "type": "string",
            "description": "The name of the product.",
            "example": "Awesome Product"
          },
          "productType": {
            "type": "string",
            "description": "The type of the product (e.g., PHYSICAL).",
            "example": "PHYSICAL"
          },
          "availableInStore": {
            "type": "boolean",
            "description": "Indicates whether the product is available in-store.",
            "example": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "The creation timestamp of the product.",
            "example": "2023-11-20T10:23:36.515Z"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "The last update timestamp of the product.",
            "example": "2024-01-23T09:57:04.846Z"
          },
          "statementDescriptor": {
            "type": "string",
            "description": "The statement descriptor for the product.",
            "example": "abcde"
          },
          "image": {
            "type": "string",
            "description": "The URL for the product image.",
            "example": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png"
          },
          "collectionIds": {
            "description": "An array of category Ids for the product",
            "example": [
              "65d71377c326ea78e1c47df5",
              "65d71377c326ea78e1c47d34"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isTaxesEnabled": {
            "type": "boolean",
            "description": "The field indicates whether taxes are enabled for the product or not.",
            "example": true,
            "default": false
          },
          "taxes": {
            "description": "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.",
            "example": [
              "654492a4e6bef380114de15a"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "automaticTaxCategoryId": {
            "type": "string",
            "description": "Tax category ID for Automatic taxes calculation.",
            "example": "65d71377c326ea78e1c47df5"
          },
          "label": {
            "description": "The Product label details",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The content for the product label.",
                    "example": "Featured"
                  },
                  "startDate": {
                    "type": "string",
                    "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                    "example": "2024-06-26T05:43:35.000Z"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                    "example": "2024-06-30T05:43:39.000Z"
                  }
                },
                "required": [
                  "title"
                ],
                "title": "ProductLabelDto"
              }
            ]
          },
          "slug": {
            "type": "string",
            "description": "The slug of the product by which the product will be navigated",
            "example": "washing-machine"
          }
        },
        "required": [
          "_id",
          "locationId",
          "name",
          "productType",
          "createdAt",
          "updatedAt"
        ],
        "title": "CreateProductResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## HighLevel SDK Examples

**Node.js** (`@gohighlevel/api-client`)

```javascript
import HighLevel from '@gohighlevel/api-client';

const ghl = new HighLevel({
  privateIntegrationToken: '<PRIVATE_INTEGRATION_TOKEN>'
});

const body = {
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
};

const response = await ghl.products.createProduct(body);
console.log(response);
```

**Python** (`gohighlevel-api-client`)

```python
from highlevel import HighLevel

client = HighLevel(
    private_integration_token='<PRIVATE_INTEGRATION_TOKEN>'
)

body = {
    "name": "Awesome Product",
    "locationId": "3SwdhCsvxI8Au3KsPJt6",
    "description": "Product description goes here.",
    "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": [
                {
                    "id": "h4z7u0im2q8",
                    "name": "XL"
                }
            ]
        }
    ],
    "collectionIds": [
        "65d71377c326ea78e1c47df5",
        "65d71377c326ea78e1c47d34"
    ],
    "isTaxesEnabled": true,
    "taxes": [
        "654492a4e6bef380114de15a"
    ],
    "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
    "isLabelEnabled": true,
    "label": {
        "title": "Featured",
        "startDate": "2024-06-26T05:43:35.000Z",
        "endDate": "2024-06-30T05:43:39.000Z"
    },
    "slug": "awesome-product",
    "seo": {
        "title": "Best Product - Buy Now",
        "description": "This is the best product you can buy online with amazing features and great value"
    },
    "taxInclusive": true
}

response = await client.products.create_product(body=body)
print(response)
```

**PHP** (`gohighlevel/api-client`)

```php
<?php
require_once 'vendor/autoload.php';

use HighLevel\HighLevel;
use HighLevel\HighLevelConfig;

$config = new HighLevelConfig([
    'privateIntegrationToken' => '<PRIVATE_INTEGRATION_TOKEN>'
]);
$ghl = new HighLevel($config);

$body = [
    'name' => 'Awesome Product',
    'locationId' => '3SwdhCsvxI8Au3KsPJt6',
    'description' => 'Product description goes here.',
    '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' => [
                [
                    'id' => 'h4z7u0im2q8',
                    'name' => 'XL'
                ]
            ]
        ]
    ],
    'collectionIds' => [
        '65d71377c326ea78e1c47df5',
        '65d71377c326ea78e1c47d34'
    ],
    'isTaxesEnabled' => true,
    'taxes' => [
        '654492a4e6bef380114de15a'
    ],
    'automaticTaxCategoryId' => '65d71377c326ea78e1c47df5',
    'isLabelEnabled' => true,
    'label' => [
        'title' => 'Featured',
        'startDate' => '2024-06-26T05:43:35.000Z',
        'endDate' => '2024-06-30T05:43:39.000Z'
    ],
    'slug' => 'awesome-product',
    'seo' => [
        'title' => 'Best Product - Buy Now',
        'description' => 'This is the best product you can buy online with amazing features and great value'
    ],
    'taxInclusive' => true
];

$response = $ghl->products->createProduct($body);
echo json_encode($response, JSON_PRETTY_PRINT);
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/products/' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "name": "Awesome Product",
      "locationId": "3SwdhCsvxI8Au3KsPJt6",
      "description": "Product description goes here.",
      "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": [
            {
              "id": "h4z7u0im2q8",
              "name": "XL"
            }
          ]
        }
      ],
      "collectionIds": [
        "65d71377c326ea78e1c47df5",
        "65d71377c326ea78e1c47d34"
      ],
      "isTaxesEnabled": true,
      "taxes": [
        "654492a4e6bef380114de15a"
      ],
      "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
      "isLabelEnabled": true,
      "label": {
        "title": "Featured",
        "startDate": "2024-06-26T05:43:35.000Z",
        "endDate": "2024-06-30T05:43:39.000Z"
      },
      "slug": "awesome-product",
      "seo": {
        "title": "Best Product - Buy Now",
        "description": "This is the best product you can buy online with amazing features and great value"
      },
      "taxInclusive": true
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/products/', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/products/"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "name": "Awesome Product",
    "locationId": "3SwdhCsvxI8Au3KsPJt6",
    "description": "Product description goes here.",
    "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": [
                {
                    "id": "h4z7u0im2q8",
                    "name": "XL"
                }
            ]
        }
    ],
    "collectionIds": [
        "65d71377c326ea78e1c47df5",
        "65d71377c326ea78e1c47d34"
    ],
    "isTaxesEnabled": true,
    "taxes": [
        "654492a4e6bef380114de15a"
    ],
    "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
    "isLabelEnabled": true,
    "label": {
        "title": "Featured",
        "startDate": "2024-06-26T05:43:35.000Z",
        "endDate": "2024-06-30T05:43:39.000Z"
    },
    "slug": "awesome-product",
    "seo": {
        "title": "Best Product - Buy Now",
        "description": "This is the best product you can buy online with amazing features and great value"
    },
    "taxInclusive": true
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/products/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/products/")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"name\":\"Awesome Product\",\"locationId\":\"3SwdhCsvxI8Au3KsPJt6\",\"description\":\"Product description goes here.\",\"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\":[{\"id\":\"h4z7u0im2q8\",\"name\":\"XL\"}]}],\"collectionIds\":[\"65d71377c326ea78e1c47df5\",\"65d71377c326ea78e1c47d34\"],\"isTaxesEnabled\":true,\"taxes\":[\"654492a4e6bef380114de15a\"],\"automaticTaxCategoryId\":\"65d71377c326ea78e1c47df5\",\"isLabelEnabled\":true,\"label\":{\"title\":\"Featured\",\"startDate\":\"2024-06-26T05:43:35.000Z\",\"endDate\":\"2024-06-30T05:43:39.000Z\"},\"slug\":\"awesome-product\",\"seo\":{\"title\":\"Best Product - Buy Now\",\"description\":\"This is the best product you can buy online with amazing features and great value\"},\"taxInclusive\":true}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/products/"
  payload := strings.NewReader(`{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/products/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "name": "Awesome Product",
  "locationId": "3SwdhCsvxI8Au3KsPJt6",
  "description": "Product description goes here.",
  "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": [
        {
          "id": "h4z7u0im2q8",
          "name": "XL"
        }
      ]
    }
  ],
  "collectionIds": [
    "65d71377c326ea78e1c47df5",
    "65d71377c326ea78e1c47d34"
  ],
  "isTaxesEnabled": true,
  "taxes": [
    "654492a4e6bef380114de15a"
  ],
  "automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
  "isLabelEnabled": true,
  "label": {
    "title": "Featured",
    "startDate": "2024-06-26T05:43:35.000Z",
    "endDate": "2024-06-30T05:43:39.000Z"
  },
  "slug": "awesome-product",
  "seo": {
    "title": "Best Product - Buy Now",
    "description": "This is the best product you can buy online with amazing features and great value"
  },
  "taxInclusive": true
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/products/' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
