Products
Manage products. Supported product types include:
BASIC— standalone productsBUNDLE— groups of products sold togetherPARENT_VARIANT— products with automatically generated variants defined by a templateVARIANT— individual variants of aPARENT_VARIANTproductDYNAMIC_VARIANT— products forming a flexible variant hierarchy of up to 4 levels. Each variant stores its ownownVariantAttributes(the attributes that distinguish it from its parent). A rootDYNAMIC_VARIANTproduct stores a denormalized flat map of all descendants in itsvariantsfield with accumulated attributes. Use the/recalculateendpoint to rebuild variant trees after bulk imports.
Search a list of products.
Additional scope information
The
product.product_read_unpublishedscope is only required if the response should contain unpublished products.The
product.product_read_by_vendorscope is only required to fetch products belonging to the vendor.
- : Needed to retrieve unpublished products.
- : The scope allows vendor to read products with assigned vendor.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
The number of documents being retrieved on the page.
60List of properties used to sort the results, separated by colons.
Possible values:
{fieldName}{fieldName}:asc{fieldName}:desc
Note: If you want to sort the results by localized properties, the possible values are:
{fieldName}.{language}{fieldName}.{language}:asc{fieldName}.{language}:desc
By default, the fields are sorted in ascending order.
Fields to be returned in the response.
When this parameter is passed, only the id, yrn and {fieldName} are retrieved for each product.
You can specify multiple fields by separating them with commas.
name,codeFields that should be expanded with additional information in the response body. Expressed as strings separated by commas. You can combine multiple values, for example expand=template,parentVariant,brand,labels.
Possible values:
templateparentVariantbrandlabels
Flag indicating whether product variant(s) should include their parent variants' attribute values.
- If set to
true, the result contains values from both the variant and its parent variant. - If set to
false, the result contains only variant values.
Flag indicating whether the total number of retrieved results should be returned.
The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred. If empty, the default system language is assumed. It can be a priority list working as a fallback mechanism.
A standard query parameter is used to search for specific values.
Resources have been retrieved successfully.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
POST /product/{tenant}/products/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"q": "code:(A705197727 OR A705197726)"
}[
{
"id": "545b4e3dfaee4c10def3db24",
"yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
"code": "SmartphoneX21415269949943",
"name": "Smartphone X2",
"description": "The world's best camera and camcorder in a waterproof smartphone.",
"published": false,
"template": {
"id": "633d774f37937d425ce5570f",
"version": 1
},
"taxClasses": {
"EN": "STANDARD"
},
"productType": "BASIC",
"relatedItems": [
{
"refId": "631c6adac2d4ea73be34f0d1",
"type": "ACCESSORY"
}
],
"customerSegmentIds": [
"689591c74ac99162678ae78f",
"689591c74ac99162678ae78g"
],
"categoryIds": [
"631c6adac2d4ea73be34f0d4",
"631c6adac2d4ea73be34f0d5"
],
"mixins": {
"productCustomAttributes": {
"pricingMeasurePrice": 13,
"unitPricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"unitPricingBaseMeasure": {
"value": 133,
"unitCode": "GRM"
},
"pricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"orderUnit": "H87",
"minOrderQuantity": 2,
"maxOrderQuantity": 10,
"defaultOrderQuantity": 2,
"taxClass": "Vat_23"
}
},
"metadata": {
"version": 1,
"createdAt": "2022-03-31T09:52:15.423Z",
"modifiedAt": "2022-03-31T09:52:15.423Z",
"schema": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/product.v2",
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json",
"productTemplateAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_templateAttributes_v1.json",
"productVariantAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_variantAttributes_v1.json"
}
}
}
]Retrieves a list of products.
Additional scope information
The
product.product_read_unpublishedscope is only required if the response should contain unpublished products.The
product.product_read_by_vendorscope is only required to fetch products belonging to the vendor.The
product.product_manage_by_vendorscope is only required to manage products belonging to the vendor.
- : Needed to retrieve unpublished products.
- : The scope allows vendor to read products with assigned vendor.
- : The scope allows vendor to manage products with assigned vendor.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
The number of documents being retrieved on the page.
60List of properties used to sort the results, separated by colons.
Possible values:
{fieldName}{fieldName}:asc{fieldName}:desc
Note: If you want to sort the results by localized properties, the possible values are:
{fieldName}.{language}{fieldName}.{language}:asc{fieldName}.{language}:desc
By default, the fields are sorted in ascending order.
A standard query parameter is used to search for specific values.
name:{productName}Fields to be returned in the response.
When this parameter is passed, only the id, yrn and {fieldName} are retrieved for each product.
You can specify multiple fields by separating them with commas.
name,codeFields that should be expanded with additional information in the response body. Expressed as strings separated by commas. You can combine multiple values, for example expand=template,parentVariant,brand,labels.
Possible values:
templateparentVariantbrandlabels
Flag indicating whether product variant(s) should include their parent variants' attribute values.
- If set to
true, the result contains values from both the variant and its parent variant. - If set to
false, the result contains only variant values.
Flag indicating whether the total number of retrieved results should be returned.
The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred. If empty, the default system language is assumed. It can be a priority list working as a fallback mechanism.
Resources have been retrieved successfully.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
GET /product/{tenant}/products HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "545b4e3dfaee4c10def3db24",
"yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
"code": "SmartphoneX21415269949943",
"name": "Smartphone X2",
"description": "The world's best camera and camcorder in a waterproof smartphone.",
"published": false,
"template": {
"id": "633d774f37937d425ce5570f",
"version": 1
},
"taxClasses": {
"EN": "STANDARD"
},
"productType": "BASIC",
"relatedItems": [
{
"refId": "631c6adac2d4ea73be34f0d1",
"type": "ACCESSORY"
}
],
"customerSegmentIds": [
"689591c74ac99162678ae78f",
"689591c74ac99162678ae78g"
],
"categoryIds": [
"631c6adac2d4ea73be34f0d4",
"631c6adac2d4ea73be34f0d5"
],
"mixins": {
"productCustomAttributes": {
"pricingMeasurePrice": 13,
"unitPricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"unitPricingBaseMeasure": {
"value": 133,
"unitCode": "GRM"
},
"pricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"orderUnit": "H87",
"minOrderQuantity": 2,
"maxOrderQuantity": 10,
"defaultOrderQuantity": 2,
"taxClass": "Vat_23"
}
},
"metadata": {
"version": 1,
"createdAt": "2022-03-31T09:52:15.423Z",
"modifiedAt": "2022-03-31T09:52:15.423Z",
"schema": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/product.v2",
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json",
"productTemplateAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_templateAttributes_v1.json",
"productVariantAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_variantAttributes_v1.json"
}
}
}
]Creates a new product.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employeesto manage products belonging to the vendor.The
product.product_publishscope is only required if you want to publish the product when creating it.
- : Needed to manage products.
- : Needed to publish products.
- : The scope allows vendor to manage products with assigned vendor.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$The parameter is valid only for PARENT_VARIANT type. If true then variants are not automatically generated for the parent variant configuration.
falseAllows to control whether the change of the state should cause reindexing or not.
trueIf set to true, the validation that checks whether related products exist is skipped. This is useful during data loading, where related products may not yet exist and will be created later. This parameter is only respected when the allowToSkipRelatedProductsValidation system setting is set to true. Otherwise, it is disregarded.
falseThe Content-Language request HTTP header defines a language or multiple languages of the request body.
- If the
Content-Languageheader is set to*, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the
Content-Languageheader is set to a specific language, the localized fields should be provided as strings. - If the
Content-Languageheader is empty, the endpoint interprets the localized fields as being provided in the default language or the languages defined in the Configuration Service.
Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.
The resource has been successfully created.
In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.
It is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.
Resources cannot be created due to an error.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Internal Server Error.
POST /product/{tenant}/products HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 193
{
"name": "Smartphone X2",
"code": "BASIC001",
"description": "The world best camera and camcorder in a waterproof smartphone.",
"published": false,
"taxClasses": {
"EN": "STANDARD"
},
"productType": "BASIC"
}{
"id": "631b4bfe61f5e1663c745ffd",
"yrn": "urn:yaas:saasag:caasproduct:product:apistage;631b4bfe61f5e1663c745ffd"
}Creates products in a bulk. The maximum batch size is 200.
Response for a particular product is returned at the same position (index) at which that price is located in the request body.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employees to manage products belonging to the vendor.The
product.product_publishscope is only required if you want to publish the product when creating it.
- : Needed to manage products.
- : Needed to publish products.
- : The scope allows vendor to manage products with assigned vendor.
Your Emporix tenant's name.Note: The tenant should always be written in lowercase.
The parameter is valid only for PARENT_VARIANT type. If true then variants are not automatically generated for the parent variant configuration.
falseAllows to control whether the change of the state should cause reindexing or not.
trueIf set to true, the validation that checks whether related products exist is skipped. This is useful during data loading, where related products may not yet exist and will be created later. This parameter is only respected when the allowToSkipRelatedProductsValidation system setting is set to true. Otherwise, it is disregarded.
falseThe Content-Language request HTTP header defines a language or multiple languages of the request body.
- If the
Content-Languageheader is set to*, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the
Content-Languageheader is set to a specific language, the localized fields should be provided as strings. - If the
Content-Languageheader is empty, the endpoint interprets the localized fields as being provided in the default language or the languages defined in the Configuration Service.
Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.
Example response
Index of the processed product, matching the price position in request body.
Product unique identifier.
HTTP Status Code.
Error specific errorCode.
HTTP Status description.
Error message.
Error message details.
Resources cannot be created due to an error.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Internal Server Error.
POST /product/{tenant}/products/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 241
[
{
"id": "abc-123",
"code": "532432412331",
"name": "Product 1",
"productType": "BASIC"
},
{
"id": "abc-124",
"code": "532432412332",
"name": "Product 2",
"productType": "BASIC"
},
{
"id": "abc-125",
"code": "532432412333",
"name": "Product 3",
"productType": "BASIC"
}
][
{
"index": 0,
"id": "62d65a15088ed94ebf093d7d",
"code": 201,
"status": "CREATED"
},
{
"index": 1,
"id": "62d65a15088ed94ebf093d8d",
"code": 201,
"status": "CREATED"
}
]Updates or creates products in a bulk. The maximum batch size is 200.
Response for a particular product is returned at the same position (index) at which it is located in the request body.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employees to manage products belonging to the vendor.The
product.product_publishscope is only required if you want to publish the product when updating it.The
product.product_unpublishscope is only required if you want to unpublish the product when updating it.
- : Needed to manage products.
- : Needed to publish products.
- : Needed to unpublish products.
- : The scope allows vendor to manage products with assigned vendor.
Your Emporix tenant's name.Note: The tenant should always be written in lowercase.
The parameter is valid only for PARENT_VARIANT type. If true then variants are not automatically generated for the parent variant configuration.
falseAllows to control whether the change of the state should cause reindexing or not.
trueIf set to true, the validation that checks whether related products exist is skipped. This is useful during data loading, where related products may not yet exist and will be created later. This parameter is only respected when the allowToSkipRelatedProductsValidation system setting is set to true. Otherwise, it is disregarded.
falseThe Content-Language request HTTP header defines a language or multiple languages of the request body.
- If the
Content-Languageheader is set to*, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the
Content-Languageheader is set to a specific language, the localized fields should be provided as strings. - If the
Content-Languageheader is empty, the endpoint interprets the localized fields as being provided in the default language or the languages defined in the Configuration Service.
Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.
Example response
Index of the processed product, matching the price position in request body.
Product unique identifier.
HTTP Status Code.
Error specific errorCode.
HTTP Status description.
Error message.
Error message details.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
PUT /product/{tenant}/products/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 250
[
{
"id": "abc-123",
"code": "532432412331",
"name": "Product 1",
"metadata": {
"version": 1
}
},
{
"id": "abc-124",
"code": "532432412332",
"name": "Product 2",
"metadata": {
"version": 1
}
},
{
"id": "abc-125",
"code": "532432412333",
"name": "Product 3",
"metadata": {
"version": 1
}
}
][
{
"index": 0,
"id": "62d65a15088ed94ebf093d7d",
"code": 204,
"status": "NO_CONTENT"
},
{
"index": 1,
"id": "62d65a15088ed94ebf093d8d",
"code": 204,
"status": "NO_CONTENT"
}
]Triggers asynchronous recalculation of the variant tree for one or more DYNAMIC_VARIANT products. Accepts up to 1000 product IDs at any hierarchy level — the system automatically resolves the root for each ID and creates one recalculation job per unique root product.
This endpoint is intended to be called after a batch of products has been fully ingested, not per individual product write. For single product writes, the variant tree is updated synchronously inline.
If a recalculation job for a given root is already PENDING or PROCESSING, the corresponding IDs are returned in skippedProductIds and the existing job is referenced in the jobs list.
- : Needed to manage products.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Request body for triggering dynamic variant recalculation. Accepts up to 1000 product IDs at any level of the hierarchy — the system resolves the root for each ID automatically. Intended to be called after a batch of products has been fully ingested, not per individual product write.
List of product IDs (variants at any hierarchy level) for which recalculation should be triggered. The system groups IDs by their root product and creates one job per unique root.
Recalculation jobs accepted. One job is created per unique root product resolved from the submitted IDs.
Response returned when recalculation is triggered. Contains one job per unique root product resolved from the submitted IDs, plus any IDs that were skipped (for example, because a job for that root is already PENDING or PROCESSING).
Product IDs that were not processed because a recalculation job for their root is already active (PENDING or PROCESSING). The existing job ID is available in the jobs list.
Resources cannot be created due to an error.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
POST /product/{tenant}/products/recalculate HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 80
{
"productIds": [
"mobile-15-pro-l1",
"mobile-15-pro-l2-retail",
"mobile-16-pro-l1"
]
}{
"jobs": [
{
"id": "job-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"parentRoot": "mobile-15-pro",
"requestedByIds": [
"mobile-15-pro-l1",
"mobile-15-pro-l2-retail"
],
"status": "PENDING",
"createdAt": "2024-01-15T10:10:00.000Z",
"processingStartedAt": null,
"finishedAt": null,
"error": null,
"attempts": 0
},
{
"id": "job-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"parentRoot": "mobile-16-pro",
"requestedByIds": [
"mobile-16-pro-l1"
],
"status": "PENDING",
"createdAt": "2024-01-15T10:10:00.000Z",
"processingStartedAt": null,
"finishedAt": null,
"error": null,
"attempts": 0
}
],
"skippedProductIds": []
}Retrieves a list of dynamic variant recalculation jobs for the tenant. Optionally filtered by job status.
Jobs are retained for approximately 30 days after reaching a terminal state (FINISHED, FAILED, or FAILED_PERMANENT) and are then automatically removed by a TTL index.
- : Needed to manage products.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Current status of a dynamic variant recalculation job.
Jobs retrieved successfully.
Represents a single dynamic variant recalculation job. One job is created per unique root product. Jobs remain queryable until automatically removed approximately 30 days after reaching a terminal state.
Unique identifier of the recalculation job.
Identifier of the root product whose variant tree is being recalculated.
List of product IDs that were submitted in the recalculation request and resolved to this root.
Current status of a dynamic variant recalculation job.
Timestamp when the job was created.
Timestamp when a subscriber picked up the job and started processing. Null while the job is still PENDING.
Timestamp when the job reached a terminal state (FINISHED, FAILED, or FAILED_PERMANENT).
Error message if the job failed. Null for successful jobs.
Number of processing attempts made for this job. Incremented on each delivery from the pub/sub subscription.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
GET /product/{tenant}/products/recalculate/jobs HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "job-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"parentRoot": "mobile-15-pro",
"requestedByIds": [
"mobile-15-pro-l1",
"mobile-15-pro-l2-retail"
],
"status": "FINISHED",
"createdAt": "2024-01-15T10:10:00.000Z",
"processingStartedAt": "2024-01-15T10:10:03.000Z",
"finishedAt": "2024-01-15T10:10:07.000Z",
"error": null,
"attempts": 1
},
{
"id": "job-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"parentRoot": "mobile-16-pro",
"requestedByIds": [
"mobile-16-pro-l1"
],
"status": "PENDING",
"createdAt": "2024-01-15T10:10:00.000Z",
"processingStartedAt": null,
"finishedAt": null,
"error": null,
"attempts": 0
}
]Retrieves the current status and details of a specific dynamic variant recalculation job. Use this endpoint to poll for job completion after triggering recalculation.
- : Needed to manage products.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Unique identifier of the recalculation job.
Job retrieved successfully.
Represents a single dynamic variant recalculation job. One job is created per unique root product. Jobs remain queryable until automatically removed approximately 30 days after reaching a terminal state.
Unique identifier of the recalculation job.
Identifier of the root product whose variant tree is being recalculated.
List of product IDs that were submitted in the recalculation request and resolved to this root.
Current status of a dynamic variant recalculation job.
Timestamp when the job was created.
Timestamp when a subscriber picked up the job and started processing. Null while the job is still PENDING.
Timestamp when the job reached a terminal state (FINISHED, FAILED, or FAILED_PERMANENT).
Error message if the job failed. Null for successful jobs.
Number of processing attempts made for this job. Incremented on each delivery from the pub/sub subscription.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource has not been found.
Internal Server Error.
GET /product/{tenant}/products/recalculate/jobs/{jobId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "job-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"parentRoot": "mobile-15-pro",
"requestedByIds": [
"mobile-15-pro-l1",
"mobile-15-pro-l2-retail"
],
"status": "FINISHED",
"createdAt": "2024-01-15T10:10:00.000Z",
"processingStartedAt": "2024-01-15T10:10:03.000Z",
"finishedAt": "2024-01-15T10:10:07.000Z",
"error": null,
"attempts": 1
}Retrieves a specified product details.
Additional scope information
The
product.product_read_unpublishedscope is only required if the product has not been published.The
product.product_read_by_vendorscope is only required to fetch products belonging to the vendor.The
product.product_manage_by_vendorscope is only required to manage products belonging to the vendor.
- : Needed to retrieve unpublished products.
- : The scope allows vendor to read products with assigned vendor.
- : The scope allows vendor to manage products with assigned vendor.
Product unique identifier generated when the product is created.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Fields to be returned in the response.
When this parameter is passed, only the id, yrn and {fieldName} are retrieved for each product.
You can specify multiple fields by separating them with commas.
name,codeFields that should be expanded with additional information in the response body. Expressed as strings separated by commas. You can combine multiple values, for example expand=template,parentVariant,brand,labels.
Possible values:
templateparentVariantbrandlabels
Flag indicating whether product variant(s) should include their parent variants' attribute values.
- If set to
true, the result contains values from both the variant and its parent variant. - If set to
false, the result contains only variant values.
The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred. If empty, the default system language is assumed. It can be a priority list working as a fallback mechanism.
Product successfully retrieved.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource has not been found.
Internal Server Error.
GET /product/{tenant}/products/{productId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"name": "Smartphone X2",
"code": "SmartphoneX21415269949943",
"description": "The world's best camera and camcorder in a waterproof smartphone.",
"id": "545b4e3dfaee4c10def3db24",
"productType": "BASIC",
"yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
"taxClasses": {
"EN": "STANDARD"
},
"published": false,
"template": {
"id": "633d774f37937d425ce5570f",
"version": 1
},
"relatedItems": [
{
"refId": "631c6adac2d4ea73be34f0d1",
"type": "ACCESSORY"
}
],
"customerSegmentIds": [
"689591c74ac99162678ae78f",
"689591c74ac99162678ae78g"
],
"categoryIds": [
"631c6adac2d4ea73be34f0d4",
"631c6adac2d4ea73be34f0d5"
],
"mixins": {
"productCustomAttributes": {
"pricingMeasurePrice": 13,
"unitPricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"unitPricingBaseMeasure": {
"value": 133,
"unitCode": "GRM"
},
"pricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"orderUnit": "H87",
"minOrderQuantity": 2,
"maxOrderQuantity": 10,
"defaultOrderQuantity": 2,
"taxClass": "Vat_23"
}
},
"metadata": {
"version": 1,
"createdAt": "2022-03-31T09:52:15.423Z",
"modifiedAt": "2022-03-31T09:52:15.423Z",
"schema": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/product.v2",
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json",
"productTemplateAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_templateAttributes_v1.json",
"productVariantAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/633d774f37937d425ce5570f_variantAttributes_v1.json"
}
}
}Updates or creates a specified product by replacing all of its existing data with data from the request body. If the metadata.version is provided then optimistic locking is enabled and version must match the version in the database.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employees to manage products belonging to the vendor.The
product.product_publishscope is only required if you want to publish the product when updating it.The
product.product_unpublishscope is only required if you want to unpublish the product when updating it.
- : Needed to manage products.
- : Needed to publish products.
- : Needed to unpublish products.
- : The scope allows vendor to manage products with assigned vendor.
Product unique identifier generated when the product is created.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$| Option | Description |
|---|---|
true | A partial product update is performed. |
false | A full product replacement is performed. |
falseThe parameter is valid only for PARENT_VARIANT type. If true then variants are not automatically generated for the parent variant configuration.
falseAllows to control whether the change of the state should cause reindexing or not.
trueIf set to true, the validation that checks whether related products exist is skipped. This is useful during data loading, where related products may not yet exist and will be created later. This parameter is only respected when the allowToSkipRelatedProductsValidation system setting is set to true. Otherwise, it is disregarded.
falseThe Content-Language request HTTP header defines a language or multiple languages of the request body.
- If the
Content-Languageheader is set to*, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the
Content-Languageheader is set to a specific language, the localized fields should be provided as strings. - If the
Content-Languageheader is empty, the endpoint interprets the localized fields as being provided in the default language or the languages defined in the Configuration Service.
Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.
The resource has been successfully created.
In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.
It is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.
The resource has been successfully updated.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource has not been found.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Internal Server Error.
PUT /product/{tenant}/products/{productId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1023
{
"name": "Smartphone X2",
"code": "TESTDOC000",
"description": "The world's best camera and camcorder in a waterproof smartphone.",
"published": false,
"taxClasses": {
"EN": "STANDARD"
},
"template": {
"id": "634cea2740033d7c2e7b03a8",
"version": 1
},
"relatedItems": [
{
"refId": "634cea2740033d7c2e7b03a9",
"type": "CONSUMABLE"
}
],
"mixins": {
"salePricesData": [
{
"salePriceStart": "2021-07-20T22:00:00.000+0000",
"salePriceAmount": 6.7,
"salePriceEnd": "2021-07-25T21:59:59.000+0000",
"enabled": false
}
],
"productCustomAttributes": {
"pricingMeasurePrice": 13,
"unitPricingMeasure": {
"value": 133,
"unitCode": "GRM"
},
"unitPricingBaseMeasure": {
"value": 100,
"unitCode": "GRM"
},
"pricingMeasure": {
"value": 100,
"unitCode": "GRM"
},
"orderUnit": "H87",
"minOrderQuantity": 2,
"maxOrderQuantity": 10,
"defaultOrderQuantity": 5
}
},
"metadata": {
"version": 1,
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json",
"salePricesData": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/salePriceData.json"
}
}
}{
"id": "631b4bfe61f5e1663c745ffd",
"yrn": "urn:yaas:saasag:caasproduct:product:apistage;631b4bfe61f5e1663c745ffd"
}Deletes a specified product.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employees to delete products belonging to the vendor.
- : Needed to manage products.
- : The scope allows vendor to manage products with assigned vendor.
Product unique identifier generated when the product is created.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Removing a parent variant product also removes all of its child variants. This applies to both PARENT_VARIANT roots with VARIANT children and DYNAMIC_VARIANT parent products with all descendant dynamic variants in the tree. This operation has to be confirmed by setting force=true.
falseAllows to control whether the change of the state should cause reindexing or not.
trueThe resource has been successfully deleted.
No content
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
DELETE /product/{tenant}/products/{productId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2
{}No content
Partially updates a specified product.
Additional scope information
The
product.product_manage_by_vendorscope is only required for vendor employees to manage products belonging to the vendor.The
product.product_publishscope is only required if you want to publish the product when updating it.The
product.product_unpublishscope is only required if you want to unpublish the product when updating it.
- : Needed to manage products.
- : Needed to publish products.
- : Needed to unpublish products.
- : The scope allows vendor to manage products with assigned vendor.
Product unique identifier generated when the product is created.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$The parameter is valid only for PARENT_VARIANT type. If true then variants are not automatically generated for the parent variant configuration.
falseAllows to control whether the change of the state should cause reindexing or not.
trueIf set to true, the validation that checks whether related products exist is skipped. This is useful during data loading, where related products may not yet exist and will be created later. This parameter is only respected when the allowToSkipRelatedProductsValidation system setting is set to true. Otherwise, it is disregarded.
falseThe Content-Language request HTTP header defines a language or multiple languages of the request body.
- If the
Content-Languageheader is set to*, the localized fields should be provided as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the
Content-Languageheader is set to a specific language, the localized fields should be provided as strings. - If the
Content-Languageheader is empty, the endpoint interprets the localized fields as being provided in the default language or the languages defined in the Configuration Service.
Note: You can provide the localized fields only in languages defined in the Configuration Service. In case the fields are provided in languages that are not defined in the Configuration Service, the request is rejected.
Product name.
Unique product identifier, defined by the user.
Product description.
Flag indicating whether the product has been published or not.
falseMark the product as weight-dependent if the line item price could change after packaging, as this is necessary to ensure that credit card payments can be authorized.
ID of brand.
Collection of label IDs.
The resource has been successfully updated.
No content
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
The requested resource does not exist.
There are three possible reasons:
- Product with given code already exists, please choose unique code for your product
- Optimistic locking failed. If user sends metadata/version attribute which is outdated (someone else updated product in the time user was performing his changes). User should retrieve the latest product data and retry the request.
- Optimistic locking failed. User did not provide metadata/version attribute in update request, but someone else updated product while it was internally handled by product service. Resending the same request can result in successful update, but the update can override recently persisted changes.
Internal Server Error.
PATCH /product/{tenant}/products/{productId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"published": true
}No content
Last updated
Was this helpful?

