Create a new product
POST
v1/products/This endpoint allows you to create a new product, including support for:
- Grouped Products: You can now create products that are part of a group. This is useful for managing variations or related items.
- Product Badges: Optionally assign a badge to the newly created product. Badges can be used to highlight special offers, new arrivals, or other product attributes.
Creating variants of a product
To add options (variants) to an existing product, you can simply
populate the variants
array as shown in the request body below.
Alternatively, you can use the Add Product Variants endpoint.
Request
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
This token is used to authenticate and access information related to the store. It is obtained through an OAuth mechanism and is required to perform operations on the store's data. The X-Manager-Token
should be included in the header of API requests that require store-related information.
Preferred language for the response. Defaults to en
if not specified.
Role of the user.
Flag to indicate if the product is in draft mode.
Product name in different languages.
This object manages product badges, including:
Localized text for the badge in Arabic (ar) and English (en). This allows you to specify the badge text for both languages.
This object allows you to define Search Engine Optimization (SEO) details for your product.
Localized title for your product in Arabic (ar) and English (en).
Product description in different languages.
Stock Keeping Unit associated with the product.
This field allows you to specify the product's barcode.
Localized short descriptions for your product in Arabic (ar) and English (en).
Description of the product.
This object allows you to set purchase restrictions for your product. Currently, both min_quantity_per_cart and max_quantity_per_cart are set to null, indicating these restrictions are not yet implemented.
This parameter indicates the start date and time for the sale price of the product. It is represented in ISO 8601 format (YYYY-MM-DDTHH:MM
.sssZ) and determines when the discounted sale price becomes effective.
This parameter represents the end date and time for the sale price of the product. It is also in ISO 8601 format and defines when the discounted sale price ends.
Product price.
Flag to indicate if the product is published.
Indicates if the product is taxable.
Flag to indicate if the product requires shipping.
List of category IDs associated with the product.
Cost of the product.
Keywords associated with the product.
Unique product URL identifier.
Weight of the product.
Currently set to null, indicating the weight value might need to be provided elsewhere.
This field allows you to specify the unit of weight (e.g., "g", "kg", "lb").
This array allows you to define custom option fields for product variants.
This array allows you to define custom user input fields during the product creation process.
Indicates the type of product. Set to "grouped_product" for grouped products. (Required for Grouped Products)
An array of objects representing the sub-products included in the grouped product. Only required when product_class is set to "grouped_product". Refer to the Update Existing Product documentation for details on the "group_products" fields.
ID of the sub-product within the group.
Number of sub-product included in the grouped product.
This array provides details about product stock levels. However, the provided fields within stocks seem incomplete.
Quantity of the product in stock
Flag to indicate if the product quantity is infinite.
Details about the storage location (ID and name).
{
"is_draft": false,
"name": {
"ar": "منتج جديد",
"en": "New Product"
},
"badge": {
"value": "string",
"body": {
"ar": "string",
"en": "string"
}
},
"seo": {
"title": {
"ar": "string",
"en": "string"
},
"description": {
"ar": "منتج اختبار",
"en": "This is a test product"
}
},
"sku": "Z.987654.1234567890",
"barcode": "string",
"short_description": {
"ar": "string",
"en": "string"
},
"description": {
"ar": "string",
"en": "string"
},
"purchase_restrictions": {
"min_quantity_per_cart": null,
"max_quantity_per_cart": null,
"sale_price_period_start": "2024-09-18T21:00:00.000000",
"sale_price_period_end": "2024-09-19T20:59:59.000000Z"
},
"price": 142.44,
"sale_price": 0,
"is_published": true,
"is_taxable": true,
"requires_shipping": true,
"categories": [
{}
],
"cost": 10,
"keywords": [
"[\"apps\",\"social\"]"
],
"slug": "string",
"weight": {
"value": 100,
"unit": "kg"
},
"custom_option_fields": [
{}
],
"custom_user_input_fields": [
{}
],
"product_class": "string",
"group_products": [
{
"item_id": "string",
"item_quantity": 3
}
],
"stocks": [
{
"available_quantity": 1,
"is_infinite": false,
"location": "string"
}
],
"": "string"
}
Request samples
Responses
This property is used to indicate whether the product is sourced externally.
Unique identifier for the product. (Set to null if is_external_product is true)
Unique identifier for the parent product, if any. This product could be a variant of the parent product. (Set to null if is_external_product is true)
Set to "grouped_product" to indicate it's a group of sub-products.
Stock Keeping Unit - unique identifier that allows a product to be tracked for inventory purposes.
This field allows you to specify a barcode associated with the product, if applicable.
Localized product name in Arabic (ar) and English (en).
SEO friendly URL, usually derived from the product name.
Base price of the grouped product (100.0).
This field is optional and can be used to provide a brief description of the product.
If the product is on sale, this field specifies the discounted price in the smallest currency unit.
This field contains the base price formatted according to the currency settings.
If applicable, this field holds the formatted discounted price.
Shows the currency type.
This field is currently unused but might be reserved for future functionalities related to product display order.
This flag indicates whether the product has options (variations) available. (e.g., different sizes or colors).
This flag signifies whether the product has custom form fields associated with it.
This array stores information about the product images.
Indicates if the product is a draft (False - published).
Shows the quanitity of the product.
This field contains the URL for the product page on your storefront.
Weight of the product.
Currently set to null, indicating the weight value might need to be provided elsewhere.
This field allows you to specify the unit of weight (e.g., "g", "kg", "lb").
This array allows you to define a list of relevant keywords associated with the product for better search optimization.
Indicates if the product is taxable.
SEO-related data for the product.
SEO title for the product page.
SEO description for the product page.
This object provides average product rating information.
Average rating score.
Total number of ratings received.
Unique identifier of the store in which the product is listed.
This parameter indicates the start date and time for the sale price of the product. It is represented in ISO 8601 format (YYYY-MM-DDTHH:MM
.sssZ) and determines when the discounted sale price becomes effective.
This parameter represents the end date and time for the sale price of the product. It is also in ISO 8601 format and defines when the discounted sale price ends.
Indicates if the product is published and visible (true).
An array of objects representing the sub-products included in the grouped product. Only required when product_class is set to "grouped_product". Refer to the Update Existing Product documentation for details on the "group_products" fields.
ID of the sub-product within the group.
This array provides details about product stock.
Details about the storage location (ID and name).
Quantity of the product in stock.
Flag to indicate if the product quantity is infinite.
Date and time the product was created.
Date and time the product was last updated.