Skip to main content

Create Product

This endpoint allows you to create a new product with detailed specifications, status, categories, and associated products.

Endpoint

  • URL: /products
  • Method: POST

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Request Headers

HeaderTypeDescription
Content-TypestringMust be application/json.
accessTokenstringAccess token for authentication. (required)

Request Body

FieldTypeDescription
namestringThe name of the product. Required.
skustringThe Stock Keeping Unit identifier. Required.
descriptionobjectDetailed description of the product.
specificationsarrayList of specifications for the product.
customUrlstringCustom URL for the product.
shortDescriptionstringA short description of the product.
weightnumberThe weight of the product.
dimensionsobjectDimensions of the product (width, height, depth).
statusstringProduct status; valid values are active or inactive.
visibilitybooleanVisibility status of the product.
manufacturerstringName of the manufacturer.
mpnstringManufacturer Part Number.
brandstringThe unique identifier (ID) of the brand.
quantityobjectQuantity details
mediaGalleryarrayArray of media (images, videos) associated with the product.
filesarrayArray of file attachments related to the product.
inventoryTypestringType of inventory management. Valid values: product, variant.
trackInventorybooleanIndicates if inventory tracking is enabled for the product.
isFeaturedbooleanSet this as true if the product is a featured product.
inventoryarrayInventory details array.
pricenumberPrice of the product. Required.
costnumberThe cost to acquire the product.
salenumberSale price for the product (if on sale).
additionalCostobjectAdditional cost details with type and value.
taxcodestringTax code for the product.
isTaxExemptbooleanWhether the product is tax exempt.
optionsarrayArray of product options available.
variantsarrayArray of product variants.
groupedProductsarrayGrouped products associated with this product, comprising product ID, quantity, and dynamic quantity.
bundledProductsarrayArray of bundled products with each having optionTitle, inputType, and isRequired status.
isFreeShippingbooleanDetermines if the product qualifies for free shipping.
manageCustomsbooleanIndicates if customs details are managed.
customsobjectCustoms information for the product.
filtersarrayFilter options applied to the product.
metaFieldsarrayArray of metadata fields related to the product.
tierPricearrayArray of tierPrice fields based on qty and price.
searchKeyWordsarrayKeywords for improving product searchability.
synonymKeywordsarrayArray of synonym keywords for enhanced search capabilities.
seoobjectSEO (Search Engine Optimization) attributes for the product.
categoriesarrayIDs of categories the product belongs to.
sortOrdernumberSorting order priority.
relatedProductsobjectInformation about related products

Description Object

FieldTypeDescription
dataTypeStringFormat of the description, either "JSON" or "HTML". Default is "HTML".
valueStringThe actual product description in specified format.

Specifications

FieldTypeDescription
nameStringName of the specification.
valueStringValue of the specification.

Dimensions

FieldTypeDescription
widthNumberWidth of the product. Default is 1.
heightNumberHeight of the product. Default is 1.
depthNumberDepth of the product. Default is 1.

Quantity

FieldTypeDescription
minQuantityNumberMinimum quantity required. Default is 1.
quantityIncrementNumberIncrement in quantity. Default is 1.
FieldTypeDescription
typeStringType of media, such as image or video.
formatStringFormat of the media file.
labelStringLabel/name for the media file.
urlStringURL where the media file is located.
isDefaultBooleanWhether this is the default/primary media. Default: false

Files

FieldTypeDescription
typeStringType of file, e.g., document, image, video. Default is "document".
formatStringFormat of the file, identifying the file type.
nameStringFile name for reference.
urlStringAccess URL for the file.

Inventory

FieldTypeDescription
stockNumberCurrent stock level.
minStockNumberMinimum stock level to maintain.

Additional Cost

FieldTypeDescription
typeStringType of additional cost. Valid values: fixed, percentage.
valueNumberThe additional cost value.

Price Range

FieldTypeDescription
minPriceNumberMinimum price within the range.
maxPriceNumberMaximum price within the range.

Options

FieldTypeDescription
optionNameStringName of the option.
optionTypeStringType of option, e.g., color, dropdown, radio, etc.
optionValuesArray of ObjectsValues associated with this option.

Option Values

FieldTypeDescription
labelStringDisplay label for the option value.
valueStringThe actual value (e.g., hex color code, text).
isDefaultBooleanWhether this is the default selected value.

Variants

FieldTypeDescription
skuStringUnique SKU for the variant.
nameStringName of the variant.
priceNumberPrice of the variant.
costNumberCost of the variant.
saleNumberSale price for the variant.
weightNumberWeight of the variant.
optionsArray of ObjectsArray of option selections for this variant.
mediaGalleryArrayVariant-specific media gallery.
inventoryArrayVariant-specific inventory details.
tierPriceArrayVariant-specific tier pricing.

Variant Options

FieldTypeDescription
optionNameStringName of the option (must match parent option).
optionValueLabelStringDisplay label of the selected value.
optionValueStringThe actual value selected.

Metafields

FieldTypeDescription
codeStringCode of the metafield (must match defined metafield).
valueStringValue for the metafield.

Customs

FieldTypeDescription
countryCodeStringCode representing the country for customs.
commodityDescriptionStringDescription of the commodity for customs purposes.
hsCodesArray of ObjectsHsCode details with country and code.

Filters

FieldTypeDescription
codeStringCode for filter criteria. [Required]
labelStringLabel for the filter. [Required]
optionsArray of ObjectsOptions available under filter criteria.

SEO

FieldTypeDescription
pageTitleStringTitle to be optimized for SEO purposes.
metaKeywordsStringKeywords to enhance searchability.
metaDescriptionStringDescription meta-tag for SEO.
FieldTypeDescription
codeStringCode associated with related product type.
labelStringLabel describing the relation.
productsArrayArray of product IDs that are related.
isShowBooleanWhether to display the related products section.

Grouped Products

FieldTypeDescription
productIdStringIdentifier of the grouped product.
quantityNumberQuantity of the product within the group.
dynamicQuantityBooleanWhether the quantity can dynamically change.

Bundled Products

FieldTypeDescription
optionTitleStringTitle of the bundled option.
inputTypeStringInput type for the bundled option.
isRequiredBooleanIndicates if the bundled product option is mandatory. Default is false.
bundledItemsArray of ObjectsItems included within the bundle configuration.

Tier Price

FieldTypeDescription
quantitynumberMinimum quantity for tier pricing.
discountnumberDiscount applied to this tier.
pricenumberPrice at this tier.
tierPricingTypestringType of tier pricing (e.g., "discount", "fixed").

Sample Request Body

Example 1: Simple Product

{
"name": "Shirt",
"sku": "Shirt-1",
"shortDescription": "White Color shirt",
"specifications": [
{
"name": "Id",
"value": "23766"
},
{
"name": "Supplier Part Number",
"value": "806611"
},
{
"name": "Manufacturer Name",
"value": "Berry Plastics"
},
{
"name": "Inv Mast Uid",
"value": "21443"
}
],
"status": "active",
"weight": 0,
"files": [],
"manufacturer": "Berry Plastics",
"brand": "65b0d13f98539a33577ac4cc",
"price": "0.00",
"options": [],
"variants": [],
"metaFields": [],
"mediaGallery": [
{
"url": "https://cdn.flexipim.com/spruceindustries/product_assets/media/1672783399_aluf-plastics-contractor-bags-pg6-6060-64600.jpg",
"type": "image",
"label": "1672783399_aluf-plastics-contractor-bags-pg6-6060-64600.jpg",
"isDefault": true
}
],
"categories": ["65b0d13f98539a33577ac4cb", "65b88ef2045a7d009e797eff"],
"tierPrice": [
{
"quantity": 3,
"discount": 20,
"price": 9,
"tierPricingType": "fixed"
},
{
"quantity": 5,
"discount": 40,
"price": 5,
"tierPricingType": "discount"
}
]
}

Example 2: Product with Variants, Options, and Metafields

{
"name": "Developer Test Item",
"sku": "5920236",
"description": {
"dataType": "HTML",
"value": "<p>This is test item</p>"
},
"shortDescription": "<p>This is test item</p>",
"status": "active",
"dimensions": {
"width": 0,
"height": 0,
"depth": 0
},
"weight": 1,
"inventoryType": "variant",
"trackInventory": false,
"quantity": {
"minQuantity": 1,
"quantityIncrement": 1
},
"inventory": [],
"price": 261.54,
"cost": 170,
"sale": 0,
"additionalCost": {
"type": "fixed",
"value": 0
},
"tierPrice": [],
"taxcode": null,
"isTaxExempt": false,
"manufacturer": "Alligator - TPMS",
"mpn": "5920234",
"brand": "65b0d13f98539a33577ac4cd",
"customUrl": "/developer-test-item/",
"seo": {},
"synonymKeywords": [],
"isFeatured": false,
"isFreeShipping": false,
"visibility": false,
"categories": ["696a558b2c0b334070270d81"],
"mediaGallery": [
{
"url": "https://4870543.app.netsuite.com/core/media/media.nl?id=10625&c=4870543&h=6j3EEZseA21iSXh8x-OElXRN7ILXhnLuqWjfMK0OrQr82Myo",
"type": "image",
"label": "10625",
"isDefault": true
},
{
"url": "https://4870543.app.netsuite.com/core/media/media.nl?id=161737&c=4870543&h=aK9u0WIwV_3GjeQMBvw_ntOCpvWIzAM5vzuN2saCsYGnBo5X",
"type": "image",
"label": "161737",
"isDefault": false
},
{
"url": "https://www.youtube.com/watch?v=DD8QUfAiR5E",
"type": "image",
"label": "1. Please watch for more details",
"isDefault": false
},
{
"url": "https://www.youtube.com/watch?v=QhTqc0znzWQ&t=42s",
"type": "image",
"label": "2. Please watch for more details",
"isDefault": false
}
],
"files": [],
"specifications": [
{
"name": "Details",
"value": "<p>This is test item</p>"
}
],
"options": [
{
"optionName": "1 Color Options",
"optionType": "radio",
"optionValues": [
{
"label": "Red",
"value": "#F51115",
"isDefault": false
}
]
},
{
"optionName": "2 Color Options",
"optionType": "radio",
"optionValues": [
{
"label": "Black",
"value": "#362DF7",
"isDefault": false
},
{
"label": "Red",
"value": "#F51115",
"isDefault": false
}
]
}
],
"variants": [
{
"sku": "5920234-Red-Black",
"name": "Developer Test Item",
"price": 284.54,
"cost": 170,
"sale": 0,
"weight": 1,
"options": [
{
"optionName": "1 Color Options",
"optionValueLabel": "Red",
"optionValue": "#F51115"
},
{
"optionName": "2 Color Options",
"optionValueLabel": "Black",
"optionValue": "#362DF7"
}
],
"mediaGallery": [],
"inventory": [],
"tierPrice": []
},
{
"sku": "5920234-Red-Red",
"name": "Developer Test Item",
"price": 284.54,
"cost": 170,
"sale": 0,
"weight": 1,
"options": [
{
"optionName": "1 Color Options",
"optionValueLabel": "Red",
"optionValue": "#F51115"
},
{
"optionName": "2 Color Options",
"optionValueLabel": "Red",
"optionValue": "#F51115"
}
],
"mediaGallery": [],
"inventory": [],
"tierPrice": []
}
],
"metaFields": [
{
"code": "capacity",
"value": "500 ml"
},
{
"code": "dimension",
"value": "100 x 50 x 30 cm"
},
{
"code": "weight",
"value": ["500g", "600g", "1000g"]
}
],
"relatedProducts": [
{
"code": "relatedProduct",
"label": "Related Product",
"products": ["69660a7730f4d2a940149eed"],
"isShow": true
}
]
}

Response

  • Status Code: 200 Created

Success Response Body

FieldTypeDescription
successbooleanIndicates the success status of the request, typically true for a successful operation.
messagestringA message conveying the outcome of the operation, e.g., "Product added Successfully".
dataobjectContains the product object detailing the product information just added.

Error Responses

Status CodeDescription
400Bad Request: Invalid input data.
401Unauthorized: Access token is invalid or missing.
500Internal Server Error: An error occurred on the server.

Notes

  • Use appropriate values for each field to successfully create a product.