Creating a New Product
Endpoint: POST /admin/products
Purpose
This endpoint allows administrators to create a new product by providing comprehensive details such as product information, pricing, stock management, SEO configurations, availability rules, images, and customer access settings. It enables setting up complex product offerings with advanced conditions like customer restrictions, sale prices, and visibility controls.
Path Parameters
No path parameters for this endpoint.
Query Parameters
No query parameters for this endpoint.
Use Case
An admin wants to add a new product to the store, setting specific pricing, stock tracking, password protection, SEO tags, customer availability, and shipping profiles. This is typically used when launching a new item in the catalog, offering time-restricted availability, or controlling purchase visibility for selected customer groups.
Request Body
Field | Type | Description |
---|---|---|
name | String | Name of the product |
sku | String | Unique Stock Keeping Unit identifier |
base_price | String | Base price of product |
cost_price | String | Internal cost price |
{
"name": "PRODUCT_NAME",
"sku": "PRODUCT_SKU",
"heading": "PRODUCT_HEADING",
"parents": [
{
"id": CATEGORY_ID,
"name": "CATEGORY_NAME",
"is_in_trash": BOOLEAN,
"is_parent_in_trash": BOOLEAN,
"is_disposable": BOOLEAN
}
],
"created_by": {
"id": CREATED_BY_ID,
"name": "CREATED_BY_NAME"
},
"product_type": "PRODUCT_TYPE",
"available": BOOLEAN,
"product_page": {
"id": PRODUCT_PAGE_ID
},
"product_layout": {
"id": PRODUCT_LAYOUT_ID
},
"custom_class": "CUSTOM_CLASS",
"available_on_date_range": BOOLEAN,
"available_from_date": "YYYY-MM-DDTHH:MM:SS",
"available_to_date": "YYYY-MM-DDTHH:MM:SS",
"available_for": "AVAILABLE_FOR_TYPE",
"selected_customers": {
"customers": [
CUSTOMER_ID_1
],
"groups": [
GROUP_ID_1
]
},
"restrict_for_selected_customers": "BOOLEAN",
"password_protected": "BOOLEAN",
"password": "PRODUCT_PASSWORD",
"available_on_weekdays": {
"enabled": BOOLEAN,
"weekdays": [
{
"day": "WEEKDAY_NAME",
"start_hour": START_HOUR,
"start_minute": START_MINUTE,
"end_hour": END_HOUR,
"end_minute": END_MINUTE
}
]
},
"base_price": "BASE_PRICE",
"cost_price": "COST_PRICE",
"administrative_status": "BOOLEAN",
"product_summary": "PRODUCT_SUMMARY",
"product_description": "PRODUCT_DESCRIPTION",
"product_properties": {
"featured_product": BOOLEAN,
"featured_product_label": "FEATURED_PRODUCT_LABEL",
"new_product": BOOLEAN,
"sold_out": BOOLEAN,
"sold_out_label": "SOLD_OUT_LABEL",
"model": "PRODUCT_MODEL",
"length": "PRODUCT_LENGTH",
"width": "PRODUCT_WIDTH",
"height": "PRODUCT_HEIGHT",
"weight": "PRODUCT_WEIGHT"
},
"product_pricing_and_stock": {
"track_inventory": BOOLEAN,
"available_stock": "AVAILABLE_STOCK",
"low_level_stock": "LOW_LEVEL_STOCK",
"minimum_order_quantity": "MINIMUM_ORDER_QUANTITY",
"maximum_order_quantity": "MAXIMUM_ORDER_QUANTITY",
"tax_profile": "TAX_PROFILE",
"shipping_profile": {
"id": SHIPPING_PROFILE_ID,
"name": "SHIPPING_PROFILE_NAME"
},
"enable_multiple_order": BOOLEAN,
"multiple_order_quantity": "MULTIPLE_ORDER_QUANTITY",
"on_sale": BOOLEAN,
"on_sale_price_type": "ON_SALE_PRICE_TYPE",
"on_sale_price": "ON_SALE_PRICE",
"expected_to_pay": BOOLEAN,
"expected_to_pay_price": "EXPECTED_TO_PAY_PRICE",
"enable_call_for_price": BOOLEAN,
"restrict_price_for": "RESTRICT_PRICE_FOR",
"restrict_price_for_selected_customers": [
"CUSTOMER_ID_1",
"CUSTOMER_ID_2",
"CUSTOMER_ID_3"
],
"restrict_purchase_for": "RESTRICT_PURCHASE_FOR",
"restrict_purchase_for_selected_customers": [
"CUSTOMER_ID_1",
"CUSTOMER_ID_2",
"CUSTOMER_ID_3"
],
"hide_price": BOOLEAN,
"variation_price": {
"label": "VARIATION_LABEL",
"display_type": "VARIATION_DISPLAY_TYPE"
},
"enable_lite_variation": BOOLEAN
},
"image_and_video": {
"images": [
{
"filename": "IMAGE_FILENAME",
"base64": "BASE64_IMAGE_STRING"
}
],
"videos": [
{
"video": "BINARY_VIDEO_FILE",
"metadata": "VIDEO_METADATA_JSON"
}
],
"spec": [
{
"filename": "SPEC_FILENAME",
"base64": "BASE64_SPEC_STRING"
}
]
},
"advanced": {
"advance_information": {
"global_trade_item_number": "GTIN_NUMBER",
"product_condition": "PRODUCT_CONDITION"
},
"webtool_disable_tracking": BOOLEAN,
"meta_tags": [
{
"name": "META_TAG_NAME",
"value": "META_TAG_VALUE",
"id": META_TAG_ID
}
]
},
"related_products": [
{
"id": RELATED_PRODUCT_ID,
"name": "RELATED_PRODUCT_NAME",
"url": "RELATED_PRODUCT_URL"
}
],
"similar_products": [
{
"id": SIMILAR_PRODUCT_ID,
"name": "SIMILAR_PRODUCT_NAME",
"url": "SIMILAR_PRODUCT_URL"
}
],
"seo_configs": [
{
"value": "SEO_CONFIG_VALUE",
"type": "SEO_CONFIG_TYPE",
"config_key": "SEO_CONFIG_KEY",
"meta_tags": []
}
],
"tags": [
{
"name": "TAG_NAME",
"values": [
"TAG_VALUE_1",
"TAG_VALUE_2",
"TAG_VALUE_3"
],
"display_in_product_page": BOOLEAN,
"enable_expanded_view": BOOLEAN
}
],
"custom_properties": [
{
"label": "CUSTOM_PROPERTY_LABEL",
"description": "CUSTOM_PROPERTY_DESCRIPTION"
}
]
}
Response
On successful creation, the API returns a detailed product object containing the newly assigned product ID, basic details (name, SKU, availability), inventory and pricing settings, SEO configurations, and related entities like shipping profiles and customer groups. This enables immediate access to the complete saved state of the product for further display or management.
{
"product": {
"id": PRODUCT_ID,
"name": "PRODUCT_NAME",
"sku": "PRODUCT_SKU",
"urls": {
"url": "PRODUCT_URL_SLUG",
"product_url": "PRODUCT_FULL_URL"
},
"heading": "PRODUCT_HEADING",
"parents": [],
"created_by": {
"id": CREATED_BY_ID,
"name": "CREATED_BY_NAME"
},
"created_at": "YYYY-MM-DDTHH:MM:SS",
"updated_at": "YYYY-MM-DDTHH:MM:SS",
"product_type": "PRODUCT_TYPE",
"available": BOOLEAN,
"product_page": {
"id": PRODUCT_PAGE_ID,
"name": "PRODUCT_PAGE_NAME"
},
"product_layout": PRODUCT_LAYOUT_OBJECT,
"custom_class": CUSTOM_CLASS,
"available_on_date_range": BOOLEAN,
"available_from_date": "AVAILABLE_FROM_DATE",
"available_to_date": "AVAILABLE_TO_DATE",
"available_for": "AVAILABLE_FOR_TYPE",
"selected_customers": {
"customers": [
{
"id": CUSTOMER_ID_1,
"name": "CUSTOMER_NAME_1"
}
],
"groups": [
{
"id": GROUP_ID_1,
"name": "GROUP_NAME_1"
}
]
},
"restrict_for_selected_customers": [],
"password_protected": BOOLEAN,
"password": "PRODUCT_PASSWORD",
"available_on_weekdays": {
"enabled": BOOLEAN,
"weekdays": [
{
"day": "WEEKDAY_NAME",
"start_hour": START_HOUR,
"start_minute": START_MINUTE,
"end_hour": END_HOUR,
"end_minute": END_MINUTE
}
]
},
"base_price": BASE_PRICE,
"cost_price": COST_PRICE,
"is_on_sale": BOOLEAN,
"sale_price": SALE_PRICE,
"sold_out": BOOLEAN,
"length": "PRODUCT_LENGTH",
"width": "PRODUCT_WIDTH",
"height": "PRODUCT_HEIGHT",
"weight": "PRODUCT_WEIGHT",
"sold_out_label": SOLD_OUT_LABEL,
"administrative_status": BOOLEAN,
"product_summary": "PRODUCT_SUMMARY",
"product_description": "PRODUCT_DESCRIPTION",
"product_pricing_and_stock": {
"track_inventory": BOOLEAN,
"available_stock": AVAILABLE_STOCK,
"low_level_stock": LOW_LEVEL_STOCK,
"minimum_order_quantity": MINIMUM_ORDER_QUANTITY,
"maximum_order_quantity": MAXIMUM_ORDER_QUANTITY,
"tax_profile": TAX_PROFILE_OBJECT,
"shipping_profile": SHIPPING_PROFILE_OBJECT,
"enable_multiple_order": BOOLEAN,
"multiple_order_quantity": MULTIPLE_ORDER_QUANTITY,
"on_sale": BOOLEAN,
"on_sale_price_type": "ON_SALE_PRICE_TYPE",
"on_sale_price": ON_SALE_PRICE,
"expected_to_pay": BOOLEAN,
"expected_to_pay_price": EXPECTED_TO_PAY_PRICE,
"enable_call_for_price": BOOLEAN,
"restrict_price_for": "RESTRICT_PRICE_FOR",
"restrict_price_for_except_customers": [],
"restrict_purchase_for": "RESTRICT_PURCHASE_FOR",
"restrict_purchase_for_selected_customers": [],
"hide_price": BOOLEAN
},
"image_and_video": {
"images": [
{
"id": IMAGE_ID,
"filename": "IMAGE_FILENAME",
"thumbnail": "BASE64_IMAGE_STRING"
"link": "LINK"
}
],
"videos": [
{
"id": VIDEO_ID,
"filename": "BINARY_VIDEO_FILE",
"thumbnail": "VIDEO_METADATA_JSON"
"link": "LINK"
}
],
"spec": [
{
"id": SPEC_ID,
"filename": "SPEC_FILENAME",
"link": "LINK"
}
]
},
"advanced": {
"advance_information": {
"global_trade_item_number": GLOBAL_TRADE_ITEM_NUMBER,
"product_condition": "PRODUCT_CONDITION"
},
"webtool_disable_tracking": BOOLEAN,
"meta_tags": []
},
"related_products": [
{
"id": RELATED_PRODUCT_ID,
"name": "RELATED_PRODUCT_NAME",
"url": "RELATED_PRODUCT_URL"
}
],
"similar_products": [
{
"id": SIMILAR_PRODUCT_ID,
"name": "SIMILAR_PRODUCT_NAME",
"url": "SIMILAR_PRODUCT_URL"
}
],
"seo_configs": [
{
"id": SEO_CONFIG_ID,
"value": "SEO_CONFIG_VALUE",
"type": "SEO_CONFIG_TYPE",
"config_key": "SEO_CONFIG_KEY",
"meta_tags": []
}
],
"tags": [],
"custom_properties": CUSTOM_PROPERTIES_OBJECT,
"reviews": [],
"product_variation": BOOLEAN
}
}
Adding Product Inventory
Endpoints: POST /admin/products/{product_id}/inventories
Purpose
This endpoint allows administrators to update inventory-related settings for a specific product. It modifies key inventory management parameters including stock levels, inventory tracking preferences, and order quantity restrictions. The endpoint ensures accurate inventory control and prevents overselling by enforcing quantity limits.
Path Parameters
Parameter | Type | Description |
---|---|---|
product_id | Integer | The unique identifier of the product whose inventory is being updated |
Query Parameters
No query parameters for this endpoint.
Use Case
Administrators use this endpoint when they need to adjust inventory settings after receiving new stock, changing inventory management strategies, or correcting system discrepancies. The functionality is essential for maintaining accurate stock levels, setting low stock alerts, and enforcing business rules around minimum and maximum order quantities. This becomes particularly important during inventory audits, seasonal stock changes, or when implementing new inventory management policies across product lines.
Request Body
Field | Type | Description |
---|---|---|
name | string | Name of the reviewer |
email | string | Email of the reviewer |
review | string | Review text written by the user |
file | array | List of files/images attached to the review |
rating | integer | Rating provided by the reviewer |
{
"product": {
"product_pricing_and_stock": {
"track_inventory": BOOLEAN,
"available_stock": "AVAILABLE_STOCK",
"low_level_stock": "LOW_LEVEL_STOCK",
"minimum_order_quantity": "MINIMUM_ORDER_QUANTITY",
"maximum_order_quantity": "MAXIMUM_ORDER_QUANTITY"
}
}
}
Response
The response confirms the successful update of inventory settings with a status message. The success message indicates all inventory parameters were updated according to the request, while any validation errors would return appropriate error messages.
{
"status": "success",
"message": "Inventory has been updated successfully"
}
Adding Product Images
Endpoints: POST /admin/products/{product_id}/image
Purpose
This endpoint enables administrators to upload and associate new images with existing products. It processes image files provided as base64-encoded strings, stores them in the product media library, and automatically generates optimized thumbnail versions. The endpoint maintains all existing media associations while adding new images.
Path Parameters
Parameter | Type | Description |
---|---|---|
product_id | Integer | The unique identifier of the product receiving the new images |
Query Parameters
No query parameters for this endpoint.
Use Case
Administrators use this endpoint when they need to add supplemental product imagery after initial product creation or to enhance existing product listings with additional visual content. Typical scenarios include adding new product angles, lifestyle shots, or updated packaging images. The endpoint handles the image processing and association automatically, ensuring proper integration with the product's existing media assets while preserving all previously uploaded content.
Request Body
Field | Type | Description |
---|---|---|
images | array | List of image objects to be uploaded |
filename | string | Name of the image file |
base64 | string | Base64-encoded string of the image content |
{
"product": {
"image_and_video": {
"images": [
{
"filename": "IMAGE_FILE_NAME",
"base64": "BASE64_FORMAT_IMAGE"
}
]
}
}
}
Response
The response provides a complete snapshot of all media assets now associated with the product, including the newly uploaded images along with any pre-existing videos and specification files. For each uploaded image, the response includes system-generated identifiers, access URLs for both the original and thumbnail versions, and the processed filename. The response maintains the product's full media context by including all previously associated videos and documents alongside the new images.
{
"product": {
"images": [
{
"id": IMAGE_ID,
"filename": "IMAGE_FILENAME",
"thumbnail": "IMAGE_THUMBNAIL_URL",
"link": "IMAGE_URL"
}
],
"videos": [
{
"id": VIDEO_ID,
"filename": "VIDEO_FILENAME",
"thumbnail": "VIDEO_THUMBNAIL_URL",
"link": "VIDEO_URL"
}
],
"specs": [
{
"id": SPEC_ID,
"filename": "SPEC_FILENAME",
"link": "SPEC_URL"
}
]
}
}
Adding Product Reviews
Endpoints: POST /admin/products/{product_id}/reviews
Purpose
This endpoint allows administrators to create and attach customer reviews to specific products. It supports adding review text, star ratings, and optional attachments. The endpoint handles the complete review creation process including media upload and association with the product.
Path Parameters
Parameter | Type | Description |
---|---|---|
product_id | Integer | The unique identifier of the product receiving the review |
Query Parameters
No query parameters for this endpoint.
Use Case
Administrators use this endpoint to add customer reviews to products, typically when importing reviews from other systems or adding verified purchase reviews. Functionality is essential for building social proof and enhancing product credibility. Common scenarios include migrating reviews during platform changes, adding professional product evaluations, or incorporating offline customer feedback into the e-commerce system. The endpoint supports batch processing of multiple reviews in a single request.
Request Body
Field | Type | Description |
---|---|---|
name | string | Name of the reviewer |
email | string | Email of the reviewer |
review | string | Review text written by the user |
file | array | List of files/images attached to the review |
rating | integer | Rating provided by the reviewer (1–5) |
{
"product": {
"reviews": [
{
"name": "USER_NAME",
"email": "USER_EMAIL",
"review": "PRODUCT_REVIEW",
"file": [
{
"filename": "FILE_NAME",
"base64": "BASE64_ENCODED_STRING"
}
],
"rating": RATING_VALUE
}
]
}
}
Response
The response returns the successfully created review with system-generated identifiers for both the review record and any uploaded media assets. The review object includes all submitted information along with the processed image URLs, replacing the original base64 data with accessible resource links. The response maintains the structure of the input while adding server-generated IDs and transforming the file attachments into accessible resources.
{
"product": {
"reviews": [
{
"id": REVIEW_ID,
"name": "USER_NAME",
"email": "USER_EMAIL",
"review": "PRODUCT_REVIEW",
"file": [
{
"id": FILE_ID,
"filename": "FILE_NAME",
"thumbnail": "THUMBNAIL_URL"
}
],
"rating": RATING_VALUE
}
]
}
}