Update an existing product.
PATCH
v1/products/{product_id}/This endpoint lets you modify an existing product. You can update various aspects of the product, including:
- General Details: Edit core information like title, description, price, and inventory.
- Grouped Products: Manage the structure of grouped products (add, remove, or change linked products).
- Product Badges: Assign, remove, or update the badge associated with the product.
Creating or modifying variants of a product
To modify or add options (variants) to the product, populate the variants
array in the request body. Each object in the variants
array can either
update an existing variant (by specifying its id
) or add a new variant (if id
is omitted).
Alternatively, you can use the
Add Product Variants
endpoint to add new variants to the product.
Request
Preferred language for the response. Defaults to en
if not specified.
An Access Token is a unique string that represents the authorization granted to a client (Partner application) by a user (Merchant or Store Manager) to access their protected resources. It is part of the OAuth 2.0 standard and is used to authenticate API requests on behalf of the user. Access Tokens have a limited lifespan and must be used within their validity period. Once expired, a new Access Token can be obtained using a Refresh Token. Access Tokens should be treated as sensitive information and must be kept secure to prevent unauthorized access to the user's data. If you do not have an Access-Token
, but have the older alternative instead, i.e., the X-Manager-Token
, then see the instructions here on how to obtain the Access-Token
.
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.
Unique identifier of the store.
Role of the user.
Indicates the type of product. Set to "grouped_product" for grouped products. (Required for Grouped Products)
Product name in different languages.
Product price.
Short description of the product.
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").
A badge is a predefined label or icon a merchant can add to their store.
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).
{
"product_class": "string",
"name": {
"ar": "منتج جديد",
"en": "New Product"
},
"price": 142.44,
"short_description": null,
"weight": {
"value": null,
"unit": "kg"
},
"badge": {
"body": {
"ar": "منتج مميز",
"en": "Special Product"
},
"icon": {
"code": "free_shipping"
}
},
"group_products": [
{
"item_id": "143",
"item_quantity": 3
}
],
"stocks": [
{
"available_quantity": 5,
"is_infinite": false,
"location": "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.