Get a Product by ID
GET
v1/products/{product_id}/Get product by ID as Manager or as Customer.
Managers need to provide the Authorization
and X-Manager-Token
headers, and the Role
should be set to Manager
.
Customers don't need an authorization token, and the Role
should be set to Customer
.
Both Customer and Manager get essentially the same object with two key differences for managers:
- In the Manager response, both the
name
field and thevalue
field in theattributes
array are objects containing "ar" (Arabic) and "en" (English) strings, while in the Customer response, they are just single strings. - The Manager response contains two additional fields:
created_at
andupdated_at
, which provide timestamps for when the product was created and last updated.
These are the main structural differences between the two responses. Other than that, they share the same structure, including the nested arrays and objects.
Request
Preferred language for the response (No effect for Managers; defaults to en
for Customers if not provided).
Role of the user.
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.
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
.
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.
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.
This object provides average product rating information.
Unique identifier of the store in which the product is listed.
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.
This array provides details about product stock.
Date and time the product was created.
Date and time the product was last updated.