Download OpenAPI specification:Download
Manage structured product information.
Key Features:
Key Benefits:
Retrieves a list of products.
Required scopes
product.product_read_unpublished
Note: Only required if the response should contain unpublished products.Resources have been retrieved successfully.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
[- {
- "id": "545b4e3dfaee4c10def3db24",
- "yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
- "code": "SmartphoneZonyYperiaX21415269949943",
- "name": "Smartphone Zony Yperia 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"
}
], - "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",
- "mixins": {
- "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json",
- "productTemplateAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/tenant/633d774f37937d425ce5570f-templateAttributes_v1.json",
- "productVariantAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/tenant/633d774f37937d425ce5570f-variantAttributes_v1.json"
}
}
}
]
Creates a new product.
Required scopes
product.product_manage
product.product_publish
Note: Only required if you want to publish the product when creating it.Schema for creating products of the BASIC type.
The resource has been successfully created.
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:
Internal Server Error.
{- "name": "Smartphone Zony Yperia X2",
- "code": "BASIC001",
- "description": "The world's best camera and camcorder in a waterproof smartphone.",
- "published": false,
- "taxClasses": {
- "EN": "STANDARD"
}, - "productType": "BASIC",
- "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": {
- "mixins": {
- "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/productCustomAttributesMixIn.v29.json",
}
}
}
{- "productId": "631b4bfe61f5e1663c745ffd",
- "yrn": "urn:yaas:saasag:caasproduct:product:apistage;631b4bfe61f5e1663c745ffd"
}
Creates products in a bulk. Response for a particular product will be returned at the same position (index) at which that price is located in the request body.
Required scopes
product.product_manage
product.product_publish
Note: Only required if you want to publish the product when creating it.A list of product create requests
Schema for creating products of the BASIC type.
Example response
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:
Internal Server Error.
[- {
- "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. Response for a particular product is returned at the same position (index) at which it is located in the request body.
Required scopes
product.product_manage
product.product_publish
Note: Only required if you want to publish the product when updating it.product.product_unpublish
Note: Only required if you want to unpublish the product when updating it.A list of product update requests
Schema for updating products of the BASIC type in bulk.
Example response
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
[- {
- "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"
}
]
Retrieves a specified product's details.
Required scopes
product.product_read_unpublished
Note: Only required if the product has not been published.Product successfully retrieved.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource has not been found.
Internal Server Error.
{- "id": "545b4e3dfaee4c10def3db24",
- "yrn": "urn:yaas:saasag:caasproduct:product:myshop;545b4e3dfaee4c10def3db24",
- "code": "SmartphoneZonyYperiaX21415269949943",
- "name": "Smartphone Zony Yperia 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"
}
], - "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",
- "mixins": {
- "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json",
- "productTemplateAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/tenant/633d774f37937d425ce5570f-templateAttributes_v1.json",
- "productVariantAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/tenant/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.
Required scopes
product.product_manage
product.product_publish
Note: Only required if you want to publish the product when updating it.product.product_unpublish
Note: Only required if you want to unpublish the product when updating it.Content-Language | string The Content-Language request HTTP header defines a language or multiple languages of the request body.
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 will be rejected. |
Schema for updating products of the BASIC type.
required | string or object Product name. |
code required | string non-empty Unique product identifier, defined by the user. |
string or object Product description. | |
object (taxClasses) Map of key-value pairs that associates tax classes with locations (countries). The key of the map should be specified as the existing location/country identifier (see the country-service). The value of the map entry should contain a tax class code (see the tax-service). Information about the association is required for price matching mechanism (see the price-service#MatchPrice). | |
published | boolean (published) Default: false Flag indicating whether the product has been published or not. |
object (productMixins) Mixins request. | |
Array of objects (relatedItem) List of items in a relationship with the main product. Assuming that in the system the following relation types are defined: | |
brandId | string Id of brand. |
labelIds | Array of strings Collection of label ids. |
object (productMetadataWithVersion) Metadata request. | |
object (template) Indicates the template that has been used during the product creation. After assigning a template to the product, the new attributes can be defined under the Note: The template with defined variant attributes can be used only in PARENT_VARIANT and VARIANT types of product. |
The resource has been successfully created.
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:
Internal Server Error.
{- "name": "Smartphone Zony Yperia 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/schemata/productCustomAttributesMixIn.v29.json",
}
}
}
{- "productId": "631b4bfe61f5e1663c745ffd",
- "yrn": "urn:yaas:saasag:caasproduct:product:apistage;631b4bfe61f5e1663c745ffd"
}
Partially updates a specified product.
Required scopes
product.product_manage
product.product_publish
Note: Only required if you want to publish the product when updating it.product.product_unpublish
Note: Only required if you want to unpublish the product when updating it.Content-Language | string The Content-Language request HTTP header defines a language or multiple languages of the request body.
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 will be rejected. |
string or object Product name. | |
code | string non-empty Unique product identifier, defined by the user. |
string or object Product description. | |
object (taxClasses) Map of key-value pairs that associates tax classes with locations (countries). The key of the map should be specified as the existing location/country identifier (see the country-service). The value of the map entry should contain a tax class code (see the tax-service). Information about the association is required for price matching mechanism (see the price-service#MatchPrice). | |
published | boolean (published) Default: false Flag indicating whether the product has been published or not. |
object (productMixins) Mixins request. | |
Array of objects (relatedItem) List of items in a relationship with the main product. Assuming that in the system the following relation types are defined: | |
brandId | string Id of brand. |
labelIds | Array of strings Collection of label ids. |
object (template) Indicates the template that has been used during the product creation. After assigning a template to the product, the new attributes can be defined under the Note: The template with defined variant attributes can be used only in PARENT_VARIANT and VARIANT types of product. | |
Array of objects (bundledProducts) List of bundled products | |
object (variantAttributes) This field contains all information about attributes and their values that are used for creating variants. It is presented in the form of a map, where 'key' is the name of the attribute and 'value' is the list of values of that attribute. The attributes and their values are based on their definitions in the | |
object (productMetadataWithVersion) Metadata with the version information. |
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.
The requested resource does not exist.
There are three possible reasons:
Internal Server Error.
{- "published": true
}
{- "code": 400,
- "status": "Bad Request",
- "message": "Validation problem with request body."
}
Deletes a specified product.
Required scopes
product.product_manage
force | boolean Default: false Removing the |
doIndex | boolean Default: true Allows to control whether the change of the state should cause reindexing or not. |
The resource has been successfully deleted.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
{- "fault": {
- "faultstring": "Invalid access token",
- "detail": {
- "errorcode": "oauth.v2.InvalidAccessToken"
}
}
}
Searches for specified products by their YRNs.
Required scopes
product.product_read_unpublished
Note: Only required if the response should contain unpublished products.expand | string Fields that should be expanded with additional information in the response body. Expressed as strings separated by commas. Possible values:
|
fields | string Fields to be returned in the response. When this parameter is passed, only the You can specify multiple fields by separating them with commas. Example: fields=name,code |
Search query result has been successfully retrieved.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
{- "yrns": [
- "urn:yaas:saasag:caasproduct:product:myshop;4474e3dfaee4c10def3d9b24",
- "urn:yaas:saasag:caasproduct:product:myshop;54cc453dfaee4c10def3db24",
- "urn:yaas:saasag:caasproduct:product:myshop;346764e3dfaee4c10defb477",
- "urn:yaas:saasag:caasproduct:product:myshop;5710b72dd2ef7d001d099fbf;57ad7bfae12690001d568a3f"
], - "params": {
- "product": {
- "fields": [
- "name",
- "code",
- "description"
]
}
}
}
[- {
- "id": "4474e3dfaee4c10def3d9b24",
- "yrn": "urn:yaas:saasag:caasproduct:product:myshop;54cc453dfaee4c10def3db24",
- "code": "code1",
- "name": "Product1",
- "description": "desc"
}, - {
- "id": "5710b72dd2ef7d001d099fbf",
- "yrn": "urn:yaas:saasag:caasproduct:product:myshop;5710b72dd2ef7d001d099fbf",
- "code": "code2",
- "name": "Product2",
- "description": "desc2"
}
]
Retrieves all product templates. You can filter the results with query parameters.
A product template defines a set of attributes which are common for all product instances based on that template.
Required scopes
product.product_template_read
pageNumber | integer 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. |
pageSize | integer Default: 60 The number of documents being retrieved on the page. |
sort | string Fields to sort the response data by following order of the parameters from left to right.
Can contain multiple fields in format:
|
q | string Standard query parameter used to search for specific values.
|
X-Total-Count | boolean Flag indicating whether the total number of retrieved results should be returned. |
Accept-Language | string 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. |
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
[- {
- "id": "634cea2740033d7c2e7b03a8",
- "name": {
- "en": "T-shirt"
}, - "attributes": [
- {
- "key": "color",
- "name": {
- "en": "Color",
- "pl": "Kolor"
}, - "type": "TEXT",
- "metadata": {
- "mandatory": false,
- "variantAttribute": true,
- "defaultValue": "GREEN"
}, - "values": [
- {
- "key": "GREEN"
}, - {
- "key": "RED"
}
]
}
], - "metadata": {
- "variantAttributesSchema": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/testTenant/634cea2740033d7c2e7b03a8-variantAttributes_v1.json",
- "templateAttributesSchema": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/saastest2/634cea2740033d7c2e7b03a8-templateAttributes_v1.json",
- "createdAt": "2022-03-31T09:52:15.423Z",
- "modifiedAt": "2022-03-31T09:52:15.423Z",
- "version": 1
}
}
]
Creates a new product template.
A product template defines a set of attributes which are common for all product instances based on that template.
Required scopes
product.product_template_manage
Content-Language | string The Content-Language request HTTP header defines a language or multiple languages of the request body.
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 will be rejected. |
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
{- "id": "545b4e3dfaee4c10def3db24",
- "name": {
- "en": "T-shirt"
}, - "attributes": [
- {
- "key": "color",
- "name": {
- "en": "Color",
- "pl": "Kolor"
}, - "type": "TEXT",
- "metadata": {
- "mandatory": false,
- "variantAttribute": true,
- "defaultValue": "GREEN"
}, - "values": [
- {
- "key": "GREEN"
}, - {
- "key": "RED"
}
]
}
]
}
{- "id": "624c3e7c3406122baacc7e93"
}
Retrieves a specified product template's details.
A product template defines a set of attributes which are common for all product instances based on that template.
Required scopes
product.product_template_read
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource has not been found.
Internal Server Error.
{- "id": "634cea2740033d7c2e7b03a8",
- "name": {
- "en": "T-shirt"
}, - "attributes": [
- {
- "key": "color",
- "name": {
- "en": "Color",
- "pl": "Kolor"
}, - "type": "TEXT",
- "metadata": {
- "mandatory": false,
- "variantAttribute": false,
- "defaultValue": "GREEN"
}, - "values": [
- {
- "key": "GREEN"
}, - {
- "key": "RED"
}
]
}
], - "metadata": {
- "variantAttributesSchema": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/testTenant/634cea2740033d7c2e7b03a8-variantAttributes_v1.json",
- "templateAttributesSchema": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/saastest2/634cea2740033d7c2e7b03a8-templateAttributes_v1.json",
- "createdAt": "2022-03-31T09:52:15.423Z",
- "modifiedAt": "2022-03-31T09:52:15.423Z",
- "version": 1
}
}
Updates a specified product template by replacing all of its existing data with data from the request body.
Note: Every product template update creates a new version of the template. Products based on previous versions are not automatically updated. In order to see the changes (for example new attributes) on the product level, you need to update the template version in applicable products.
Required scopes
product.product_template_manage
Content-Language | string The Content-Language request HTTP header defines a language or multiple languages of the request body.
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 will be rejected. |
required | object Localized product template name in a form of a map of translations. |
required | Array of objects (productTemplateAttribute) List of attributes related to the product template. |
required | object |
No Content
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:
Internal Server Error.
{- "name": {
- "en": "T-shirt"
}, - "attributes": [
- {
- "key": "color",
- "name": {
- "en": "Color",
- "pl": "Kolor"
}, - "type": "TEXT",
- "metadata": {
- "mandatory": false,
- "variantAttribute": true,
- "defaultValue": "GREEN"
}, - "values": [
- {
- "key": "GREEN"
}, - {
- "key": "RED"
}
]
}
], - "metadata": {
- "version": 1
}
}
{- "code": 400,
- "status": "Bad Request",
- "message": "Validation problem with request body."
}
Deletes a specified product template. Only product templates which are not used in products and parent variants can be deleted.
Required scopes
product.product_template_manage
No Content
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Internal Server Error.
{- "fault": {
- "faultstring": "Invalid access token",
- "detail": {
- "errorcode": "oauth.v2.InvalidAccessToken"
}
}
}