[GET] Get Product Data
Request Description
GET /v1/product/[product id]
The request allows you to get the data of the product.
Connection Data
- Endpoints URL:
- Production environment: https://api.ecommerce.noventiq.com/v1/product
- Test environment: https://api.ecommerce.noventiq.com.demoslweb.com/v1/product
- Request Method: GET
- Authorization: token-based
Product identifier
You can get it from: Example: /v1/product/123456
You can get it from: Example: /v1/product/123456
Authorization token
- Format:
Bearer [token]
- Replace [token] with the token value you get in response to the request sent to the Authentication API
Request Example
GET https://api.ecommerce.noventiq.com/v1/product/123456
Response Description
In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.
Successful Response
If processing is successful, the following will return in response:
- Server response code: HTTP/1.1 200 ОК
- Response body: product data in JSON format
Product data
- The list and the format of the parameters is the same as in the request for creating products.
- If any of the parameters is optional or is not filled in when creating/editing a product, it is filled in with the default value.
- When working in the test environment: for all the parameters that contain URLs leading to our's end, these URLs in responses will be intended for the test environment (they will have the .demoslweb.com suffix added).
Example of Successful Response (product with properties filled out in full)
{
"id": 4648350,
"update_date": "2020-10-25 14:18:00",
"family_name": "Demo Product",
"name": "1 Pc / 1 year",
"is_publish": true,
"image_url": "https://my-shop.com/images/product-1234.png",
"description": "<p><strong>Test product</strong></p>",
"comment_for_manager": "There will be a full description later",
"url_to_instructions": "https://www.google.com",
"url_to_download": "https://www.google.com",
"business_segment": "b2c",
"available_for_sale": "all",
"is_service": true,
"license_type": "new",
"licence_term": "P1Y",
"renew_settings": {
"product_id_for_renew": [
4645130,
4645131,
4645131
],
"renew_ar": {
"enable": true,
"required": false
},
"renew_pmr": true,
"renew_email": false
},
"localization_values": {
"en_EN": {
"family_name": "Test product",
"name": "1 PC/1 year",
"description": "<p><strong>Test product</strong> for test purchase</p>",
"comment_for_cart": "This is a test purchase.",
"comment_for_product_top": "The license is valid for 1 year.",
"comment_for_product_middle": "New version of the test product.",
"comment_for_product_for_AR": "The license is renewed automatically.",
"comment_for_product_for_MR": "You will need to manually renew your license after 1 year.",
"comment_for_product_bottom": "This license is not for sale or activation outside of the country."
},
"cs_CZ": {
"family_name": "Zkušební výrobek",
"name": "1 ks / 1 rok",
"description": "<p><strong>Testovací produkt</strong> pro zkušební nákup</p>",
"comment_for_cart": "Jedná se o zkušební nákup.",
"comment_for_product_top": "Licence je platná po dobu 1 roku.",
"comment_for_product_middle": "Nová verze testovaného produktu.",
"comment_for_product_for_AR": "Licence se obnovuje automaticky.",
"comment_for_product_for_MR": "Budete muset ručně obnovit licenci po 1 roce.",
"comment_for_product_bottom": "Tato licence není určena k prodeji nebo aktivaci mimo zemi."
}
},
"display_settings": {
"hide_name": true,
"hide_item_quantity": true
},
"variants": [{
"vendor_code": "1",
"sku": "111",
"from": 1,
"to": 5,
"price": {
"USD": {
"currency": "USD",
"price": "99.99"
},
"EUR": {
"currency": "USD",
"price": "99.99"
}
}
}, {
"vendor_code": "1",
"sku": "111",
"from": 6,
"price": {
"USD": {
"currency": "USD",
"price": "80.99"
},
"EUR": {
"currency": "USD",
"price": "80.00"
}
}
}
],
"cross_sell": {
"type": "add_to_basket",
"status": true,
"date_from": "2020-10-15 14:18:00",
"date_to": "2020-10-25 14:18:00",
"removal_available": true,
"quantity_change_available": false,
"product_id": [
4645130,
4645131
]
},
"typo": {
"status": true,
"date_from": "2020-10-15 14:18:40",
"date_to": "2020-10-25 14:18:40",
"localization_values": {
"en_EN": {
"comment_for_typo": "This is a test purchase."
},
"cs_CZ": {
"comment_for_typo": "Jedná se o zkušební nákup."
}
},
"product_id": [
4645130,
4645131
]
},
"license_data": {
"en_EN": {
"customer_notification": "Key: {KEY}"
},
"cs_CZ": {
"customer_notification": "Klíč: {KEY}"
}
}
}
Example of Successful Response (product with minimal data set)
{
"id": 4648350,
"update_date": "2020-10-25 14:18:00",
"family_name": "Demo Product",
"name": "1 Pc / 1 year",
"is_publish": true,
"image_url": "",
"description": "",
"comment_for_manager": "",
"url_to_instructions": "",
"url_to_download": "",
"business_segment": "",
"licence_term": "",
"localization_values": [],
"display_settings": {
"hide_name": false,
"hide_item_quantity": false
},
"renew_settings": {
"product_id_for_renew": [],
"renew_ar": {
"enable": false,
"required": false
},
"renew_pmr": false,
"renew_email": false
},
"variants": [{
"vendor_code": "1",
"sku": "111",
"sku_ar": "",
"price": {
"USD": {
"currency": "USD",
"price": "99.99"
}
}
}
],
"typo": [],
"cross_sell": [],
"license_data": [],
"available_for_sale": "all",
"is_service": true,
"license_type": "new"
}
Error Response
If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.
TTP Server Response Error Code
HTTP code | Description |
HTTP/1.1 400 Bad Request | The request is not valid (error in parameters; necessary data is not transferred, etc.). An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 401 Unauthorized | Unsuccessful authorization. An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 404 Not found | Invalid request URL or no product having the identifier transferred is found. If no product is found, an additional additional error code will return in the response body. |
HTTP/1.1 500 Request Error | Internal Server Error. Please try again later or contact support. |
Additional Error Codes for HTTP 400
Error | Message | Description |
1220 | Failed to generate a response for product [id]. Please contact technical support. | During processing, we could not identify your account setting unambiguously. Please contact support team. |
Additional Error Codes for HTTP 401
The errors are the same for all the APIs that use token authorization.
Additional Error Codes for HTTP 400
Error | Message | Description |
1030 | Product not found | No product with the identifier transferred is found, or you do not have the rights to get the data. |
Example of Error Response
{
"errors": [{
"error": 1030,
"message": "Product not found"
}
]
}