Update an existing product.
PATCH
https://api.zid.sa/v1v1/products/{product_id}/
Products
Creating or modifying variants of a product
variants
array in the request body. Each object in the
variants
array can eitherupdate an existing variant (by specifying its
id
) or add a new variant (if id
is omitted).Add Product Variants
endpoint to add new variants to the product.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.zid.sa/v1v1/products//' \
--header 'Accept-Language;' \
--header 'Access-Token: eyJpdiI6Imh3L2dGbmJmRnVCOUY4WW5WQ2s3RFE9PSIsInZhbHVlIjoiZklpRnJyVGV1OWcrZUJBNk44bVp5SjZzSS92V3czcTJjbnJ2dFYvenZ3SFBtWHNSMFU3ZEMzZ0ZJNnpucVE4Ui9rNFdicUduOGpKUlg1VXdGOFFIaVUzZjZyUUZybWx3R0tNY3orUmxoUUUxQ29wSkEyVDZTVnVYb2dlUXJSVzBYVkdESjBpS0xiN05Hbndzc2wzV2N0YitGM1NEdkk4ckZZOTZsTFdEL1ZQRlJJTE5FQmttZng2elpwL1RCeXFRdUd1U3JTc0FHV1kySS80RFJaWlIyZ3gwM2FsQVRFbkt3VWtFOUQyKzdGOD0iLCJtYWMiOiJmZDQ0YzM4ODE0OWQxOWRhYWU0NDhhYmIzYzQ1MDAxMDAzODZjZGM3ZGM4NGJhMGNkMDEyYWZlM2UzYjAxMTI4IiwidGFnIjoiIn0=' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMTciLCJqdGkiOiJhMTg5ZTg3MmYxMzhkMWVhYjU5MjVkMDkyMGE5NmI0YjliNjg0Y2E2ZTdmM2M2MjljZWYxNmQ4NDJjMmJlYmVhMjI4YTdmMTA0ZWQ4NWE5NCIsImlhdCI6MTY3OTU3Njk5OS41NjY4NzcsIm5iZiI6MTY3OTU3Njk5OS41NjY4OCwiZXhwIjoxNzExMTk5Mzk5LjQ4NjE1Mywic3ViIjoiMTgyNDc1Iiwic2NvcGVzIjpbInRoaXJkLXBhcnRpZXMtYXBpcyJdfQ.i07ef09nVNXGZF-g-QXpNoS2vlFQK_zntAqAMS4Az2XD2EyMLhxLZZRL-QlR11zUPqMmXjMAl_4ooKa3M3zkfZQ6Ga6qStvamk8RnC_39VUx0lfN2A4k65ERZpqwrMy6-t3dE99zay3aicIdNvbgi0zeuMSE5Tn99u-2AtSRa8ffbfAcYPPXacHrhdmlYzdiZS_x_skovFEow1E-nDjdL1WHqO92XdZ7RfNLkiYFTjZlZmM_UruvioaR3q6TXJbqRK_ZrziivezL8ohIQ2SBosUp58I29rlKzvlw_R2j0rKKYZbdxYDaxAHOISmOFKAlO66k7dNevAHI3s4uGIjoGA6ZXHknccWPLLLiaAQ0r64HV8GowW5dg2rhZNurJGDTnLlBQ6F-ql42ptHzSAfzzi576CEoN3gMVpgXcbntUY3reETkFsTBPUjeSuMpANMioXAA0GRp3Ut-84fTnrWxqsCW1WVUIx33HvmfCGPXIdkaCCWoA6G6KXo04MtFbKXQmXkK9esQWI-rqdVnMD3zSR3g3yFHZSL1U-mZeNja03706Rav1ordsRNOtRwtLuoRRbk9KasbUpEwqq4Ao9lqZZwRIjdEw-pQtnUT8V53fhmuuRIefCLFO7eGEtGUnh9o6Uh_pgi6AB6uSlnN9GEMGgI1alqvMmTjxvC-HHt0V-Y' \
--header 'Store-Id: 37213' \
--header 'Role: Manager' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
{
"is_external_product": false,
"id": null,
"parent_id": null,
"product_class": "string",
"sku": "string",
"barcode": "string",
"name": {
"ar": "string",
"en": "string"
},
"slug": "string",
"price": 0,
"short_description": null,
"sale_price": 50,
"formatted_price": "10$",
"formatted_sale_price": "8$",
"currency": "string",
"currency_symbol": "string",
"attributes": [
{}
],
"categories": [
{}
],
"display_order": null,
"has_options": false,
"has_fields": true,
"images": [
{}
],
"is_draft": true,
"quantity": null,
"is_infinite": true,
"html_url": "string",
"weight": {
"value": 100,
"unit": "kg"
},
"keywords": [
{}
],
"requires_shipping": true,
"is_taxable": false,
"structure": "string",
"seo": {
"title": {
"ar": "string",
"en": "string"
},
"description": {}
},
"rating": {
"average": 3.9,
"total_count": 400,
"1_ratings": {
"percentage": 0,
"count": 0
},
"2_ratings": {
"percentage": 0,
"count": 0
},
"3_ratings": {
"percentage": 0,
"count": 0
},
"4_ratings": {
"percentage": 0,
"count": 0
},
"5_ratings": {
"percentage": 0,
"count": 0
}
},
"store_id": 0,
"purchase_restrictions": {
"min_quantity_per_cart": null,
"max_quantity_per_cart": null,
"availability_period_start": null,
"availability_period_end": null,
"sale_price_period_start": "2024-09-18T21:00:00.000000Z",
"sale_price_period_end": "2024-09-19T20:59:59.000000Z"
},
"metafields": null,
"meta": {},
"badge": {
"body": {
"ar": "string",
"en": "string"
},
"icon": {
"code": "string"
}
},
"related_products_settings": "string",
"related_products_title": null,
"variants": [
{}
],
"options": [
{}
],
"cost": 0,
"is_published": true,
"waiting_customers_count": null,
"description": {},
"custom_user_input_fields": [
{}
],
"custom_option_fields": [
{}
],
"related_products": [
{}
],
"next_product": null,
"previous_product": null,
"group_products": [
{
"id": "143",
"item": {
"id": "string",
"product_class": null,
"sku": "string",
"barcode": "string",
"parent_id": null,
"name": {
"ar": "string",
"en": "string"
},
"slug": "string",
"price": 0,
"short_description": null,
"sale_price": null,
"formatted_price": "string",
"formatted_sale_price": null,
"currency": "string",
"currency_symbol": "string",
"attributes": [
{}
],
"categories": [
{}
],
"display_order": null,
"has_options": true,
"has_fields": true,
"images": [
{}
],
"is_draft": true,
"quantity": null,
"is_infinite": true,
"html_url": "string",
"weight": {
"value": null,
"unit": "string"
},
"keywords": [
{}
],
"requires_shipping": true,
"is_taxable": true,
"structure": "string",
"seo": {
"title": {
"ar": "string",
"en": "string"
},
"description": {}
},
"rating": {
"average": 4.1,
"total_count": 50,
"1_ratings": {
"percentage": 0,
"count": 0
},
"2_ratings": {
"percentage": 0,
"count": 0
},
"3_ratings": {
"percentage": 0,
"count": 0
},
"4_ratings": {
"percentage": 0,
"count": 0
},
"5_ratings": {
"percentage": 0,
"count": 0
}
},
"store_id": 0,
"purchase_restrictions": {
"min_quantity_per_cart": null,
"max_quantity_per_cart": null,
"availability_period_start": null,
"availability_period_end": null
},
"metafields": null,
"meta": null,
"badge": null,
"related_products_settings": "string",
"related_products_title": null,
"created_at": "string",
"updated_at": "string",
"options": [
{}
],
"group_products": null,
"stocks": [
{
"id": "string",
"location": {
"id": "string",
"name": {
"ar": "string"
},
"type": "string"
},
"available_quantity": null,
"is_infinite": false
}
]
},
"origin_product_id": "string",
"item_id": "string",
"item_quantity": 0,
"in_stock": true
}
],
"stocks": [
{
"id": "string",
"location": {
"id": "string",
"name": {
"ar": "string"
},
"type": "string"
},
"available_quantity": null,
"is_infinite": true
}
],
"sold_products_count": null,
"created_at": "string",
"updated_at": "string"
}
Request
Path Params
product_id
stringÂ
required
Example:
107c2ff5-5c70-4749-b9bd-56dc1793013b
Header Params
Accept-Language
enum<string>Â
optional
en
if not specified.Allowed values:
enar
Example:
en
Access-Token
stringÂ
required
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
.Example:
eyJpdiI6Imh3L2dGbmJmRnVCOUY4WW5WQ2s3RFE9PSIsInZhbHVlIjoiZklpRnJyVGV1OWcrZUJBNk44bVp5SjZzSS92V3czcTJjbnJ2dFYvenZ3SFBtWHNSMFU3ZEMzZ0ZJNnpucVE4Ui9rNFdicUduOGpKUlg1VXdGOFFIaVUzZjZyUUZybWx3R0tNY3orUmxoUUUxQ29wSkEyVDZTVnVYb2dlUXJSVzBYVkdESjBpS0xiN05Hbndzc2wzV2N0YitGM1NEdkk4ckZZOTZsTFdEL1ZQRlJJTE5FQmttZng2elpwL1RCeXFRdUd1U3JTc0FHV1kySS80RFJaWlIyZ3gwM2FsQVRFbkt3VWtFOUQyKzdGOD0iLCJtYWMiOiJmZDQ0YzM4ODE0OWQxOWRhYWU0NDhhYmIzYzQ1MDAxMDAzODZjZGM3ZGM4NGJhMGNkMDEyYWZlM2UzYj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
stringÂ
optional
Example:
37213
Role
stringÂ
optional
Example:
Manager
Body Params application/json
Responses
Modified at 2025-01-15 08:09:55