LogoLogo
CommunitySupport PortalYouTubeStart a free trial
  • Welcome
  • Commerce Engine
  • Orchestration Engine
  • API Documentation
  • Release Notes
  • Changelog
  • Emporix API
    • List of API Services
  • OpenAPI Generator
  • Standard Practices
    • General Info
    • Mixins
    • Query Parameter
    • Translations
    • Custom ID
    • Upsert
    • B2B Token
  • API Guides and References
    • Authorization
      • OAuth Service
        • API Reference
          • Customer Token
          • Anonymous Token
          • Service Access Token
          • Models
        • View Raw API Specification
    • Artificial Intelligence
      • AI Service
        • AI Tutorials
        • API Reference
          • Text Generation
          • AI Completions
          • Models
        • View Raw API Specification
    • Configuration
      • Configuration Service
        • Language Tutorials
        • API Reference
          • Tenant configurations
          • Client configurations
          • Global configurations
          • Models
        • View Raw API Specification
      • Country Service
        • Country Tutorial
        • API Reference
          • Countries
          • Regions
          • Models
        • View Raw API Specification
      • Currency Service
        • Currency Tutorial
        • API Reference
          • Currencies
          • Currency exchange
          • Models
        • View Raw API Specification
      • Unit Handling Service
        • Unit Handling Tutorial
        • API Reference
          • Unit management
          • Type management
          • Unit conversion
          • Models
        • View Raw API Specification
      • Site Settings Service
        • Site Settings Tutorial
        • API Reference
          • Mixins
          • Site settings
          • Models
        • View Raw API Specification
      • Indexing Service
        • Indexing Tutorial
        • API Reference
          • Configuration
          • Public Configuration
          • Reindex
          • Models
        • View Raw API Specification
    • Catalogs and Categories
      • Catalog Service
        • Catalog Tutorials
        • API Reference
          • List catalogs
          • Catalog management
          • Models
        • View Raw API Specification
      • Category Service
        • Category Tutorials
        • API Reference
          • Category Resources
          • Category Assignment Resources
          • Assignment Resources
          • Category Tree Resources
          • Models
        • View Raw API Specification
    • Products, Labels and Brands
      • Product Service
        • Product Tutorial
        • API Reference
          • Products
          • Product Templates
          • Models
        • View Raw API Specification
      • Label Service
        • Label Tutorial
        • API Reference
          • Label
          • Media
          • Models
        • View Raw API Specification
      • Brand Service
        • Brand Tutorial
        • API Reference
          • Brands
          • Media
          • Models
        • View Raw API Specification
    • Prices and Taxes
      • Price Service
        • Price Tutorials
        • API Reference
          • Price lists
          • Price matching
          • Price models
          • Prices
          • Prices assigned to price lists
          • Models
        • View Raw API Specification
      • Tax Service
        • Tax Tutorials
        • API Reference
          • Taxes
          • Tax calculation
          • Models
        • View Raw API Specification
    • Users and Permissions
      • IAM Service
        • IAM Tutorial
        • API Reference
          • Access Controls
          • Group Assignments
          • Groups
          • Permissions
          • Resources
          • Roles
          • Access Control Templates
          • Users
          • Management Dashboard Users
          • Models
        • View Raw API Specification
      • Session-context Service
        • Session-context Tutorial
        • API Reference
          • Session management
          • Session context modification
          • Own session management
          • Own session context modification
          • Models
        • View Raw API Specification
    • Companies and Customers
      • Customer Management
        • Customer Management Tutorial
        • API Reference
          • Locations
          • Contact Assignments
          • Legal Entities
          • Models
        • View Raw API Specification
      • Customer Service (Customer Managed)
        • API Reference
          • Addresses
          • Authentication and authorization
          • Account and profile
          • Double opt In
          • Credentials
          • Models
        • View Raw API Specification
      • Customer Service (Tenant Managed)
        • API Reference
          • Account and profile
          • Addresses
          • Models
        • View Raw API Specification
      • Customer Segments
        • Segments Tutorial
        • API Reference
          • Segments
          • Customers Assignments
          • Items Assignments
          • Models
        • View Raw API Specification
      • Approval Service
        • Approval Tutorials
        • API Reference
          • Approvals
          • Approval
          • Search
          • Models
        • View Raw API Specification
    • Delivery and Shipping
      • Shipping Service
        • Shipping Tutorial
        • API Reference
          • Customer Group Relations
          • Delivery Windows
          • Shipping Cost
          • Shipping Methods
          • Shipping Zones
          • Shipping Groups
          • Sites
          • Delivery Times Management
          • Delivery Times Slots Management
          • Delivery Cycles
          • Models
        • View Raw API Specification
      • Delivery Providers Service
        • API Reference
          • Delivery Orders
          • Delivery Plan
          • Models
        • View Raw API Specification
    • Rewards and Promotions
      • Coupon Service
        • Coupon Tutorial
        • API Reference
          • Coupon Management
          • Coupon Validation
          • Coupon Redemption
          • Referral Coupon Management
          • Models
        • View Raw API Specification
      • Reward-points Service
        • Reward-points Tutorial
        • API Reference
          • Redeem Options Management
          • Signed In Customer Reward Points
          • Reward Points Management
          • Models
        • View Raw API Specification
    • Quotes
      • Quote Service
        • Quote Tutorial
        • API Reference
          • Quote management
          • Quote history
          • Quote pdf
          • Quote reason
          • Models
        • View Raw API Specification
    • Checkout
      • Cart Service
        • Cart Tutorial
        • API Reference
          • Carts
          • Cart items
          • Discounts
          • Models
        • View Raw API Specification
      • Payment-gateway Service
        • Payment-gateway Tutorial
        • API Reference
          • Payment
          • Payment frontend
          • Payment mode
          • Transaction
          • Payment mode frontend
          • Models
        • View Raw API Specification
      • Checkout Service
        • Checkout Tutorial
        • API Reference
          • Checkouts
          • Models
        • View Raw API Specification
      • Fee Service
        • Fee Tutorial
        • API Reference
          • Fee management
          • Item Fee management
          • Product Fees management
          • Item Fee search
          • Models
        • View Raw API Specification
      • Shopping List
        • API Reference
          • Shopping Lists
          • Models
        • View Raw API Specification
    • Orders
      • Availability Service
        • Availability Tutorial
        • API Reference
          • Locations
          • Availabilities
          • Models
        • View Raw API Specification
      • Order Service
        • Order Tutorial
        • API Reference
          • Orders (tenant Managed)
          • Orders (customer Managed)
          • Models
        • View Raw API Specification
      • Pick-pack Service
        • API Reference
          • Orders
          • Assignees
          • Order cycles
          • Recalculations
          • Events
          • Models
        • View Raw API Specification
      • Invoice Service
        • Invoice Tutorial
        • API Reference
          • Invoice Jobs
          • Models
        • View Raw API Specification
      • Returns Service
        • Returns Tutorial
        • API Reference
          • Returns
          • Models
        • View Raw API Specification
      • SEPA Export Service
        • API Reference
          • Files
          • Jobs
          • Models
        • View Raw API Specification
    • Utilities
      • Schema Service
        • Schema Tutorial
        • API Reference
          • Schema
          • Type
          • Reference
          • Custom Schema Type
          • Custom Instance
          • Models
        • View Raw API Specification
      • Sequential-id Service
        • Sequential-id Tutorial
        • API Reference
          • Sequential IDs management
          • Models
        • View Raw API Specification
    • Media
      • Media Service
        • Media Tutorial
        • API Reference
          • Assets
          • Models
        • View Raw API Specification
    • Webhooks
      • Webhook Service
        • Webhooks Tutorial
        • API Reference
          • Config
          • Events
          • Svix Emporix Shared Account
          • Models
        • View Raw API Specification
      • Events-Availability
      • Events-Cart
      • Events-Catalog
      • Events-Category
      • Events-Client Management
      • Events-Customer
      • Events-Index
      • Events-Order
      • Events-Price
      • Events-Product
      • Events-Quote
      • Events-Product
    • Integrations
      • Identity Providers
        • Auth0
      • Workflow Automation
        • Emporix and Make
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API Guides and References
  2. Products, Labels and Brands
  3. Product Service
  4. API Reference

Product Templates

PreviousProductsNextModels

Was this helpful?

LogoLogo

Resources

  • Emporix.com
  • Developer Policy
  • Terms of Use

Find us

  • LinkedIn

© 2025 Emporix. All Rights Reserved.

Manage Product Templates

Retrieving a product template

get

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

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
product-template-idstringRequired

Unique identifier of the product template.

Query parameters
versionstringOptional

Version of the product template. If the parameter is not provided, the latest version of product template is returned.

Header parameters
Accept-LanguagestringOptional

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.

Responses
200Success
application/json
Responseall of
and
and
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
404
Resource has not been found.
application/json
500
Internal Server Error.
application/json
get
GET /product/{tenant}/product-templates/{product-template-id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "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
  }
}

Deleting a product template

delete

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

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
product-template-idstringRequired

Unique identifier of the product template.

Responses
204
No Content
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
500
Internal Server Error.
application/json
delete
DELETE /product/{tenant}/product-templates/{product-template-id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

  • GETRetrieving all product templates
  • POSTCreating a new product template
  • GETRetrieving a product template
  • PUTUpdating a product template
  • DELETEDeleting a product template

Retrieving all product templates

get

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

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberintegerOptional

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.

pageSizeintegerOptional

The number of documents being retrieved on the page.

Default: 60
sortstringOptional

Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case. While sorting by a localised field the following rule is taken into account:

  1. If a localized field contains information about a language then the language should be used. For example name.en:ASC. In that case en language will be used for sorting the name property. The language suffix takes precedence over Accept-Language header.
  2. If a localized field does not contain information about language then Accept-Language header will be used. For example name:ASC and Accept-Language: de. In that case de will be used for sorting the name property
  3. If a localized field does not contain information about language and Accept-Language header contains * then default language from configuration service will be used as a language. For example name:ASC and Accept-Language: * and default language is pl then pl will be used as a language for name property
  4. If a localized field does not contains information about language and Accept-Language header does not exists in the request then default language from configuration service will be used. "
qstringOptional

Standard query parameter used to search for specific values.

  • Searching for an item by string property: q=id:31065d5b-b62e, where id is the field name and 31065d5b-b62e is its required value.
  • Searching for an item by localized field property: q=name.en:T-s where name is the name of the field, en is a language code and T-s is a required value of this field. This query works only for localized fields, which are stored in a Map format where key is a language code and value is translation to particular language. + Searching for items by date property. All numer-based property queries are valid also for dates. In that case the date should be placed within double quotes: q=metadata.createdAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z") + Searching for items with non existing or empty property: q=name.en:null where name.en is a name of fields that has value null. + Searching for items with existing property: q=attributes:exists where attributes is a name of field that has non null value. + Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494) where id is name of field and strings within a bracket are it''s required value. + Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f name.en:T-s where id and ''name.en'' are the names of fields. All documents that contain given values of these fields are returned. Multiple fields separated by space can be specified. Multiple values for each field can be also specified in a format presented above. + Searching for items with string fields conforming to a regex: q=name.en:~ABCD12 or q=name.en:(~AB CD) - in case of searching for strings with space, where name is the name of field and ABCD12 or AB CD is it''s querying regex.'
Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Accept-LanguagestringOptional

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.

Responses
200Success
application/json
400
Bad request due to validation, incorrect parameters, etc.
application/json
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
500
Internal Server Error.
application/json
get
GET /product/{tenant}/product-templates HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "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
    }
  }
]

Creating a new product template

post

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

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines a language or multiple languages of the request body.

  • If the Content-Language header 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-Language header is set to a specific language, the localized fields should be provided as strings.
  • If the Content-Language header is empty, the endpoint will assume that the localized fields are provided in the default language or 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 will be rejected.

Body
all ofOptional
and
Responses
201Success
application/json
400
Bad request due to validation, incorrect parameters, etc.
application/json
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
500
Internal Server Error.
application/json
post
POST /product/{tenant}/product-templates HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 256

{
  "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"
}

Updating a product template

put

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

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
product-template-idstringRequired

Unique identifier of the product template.

Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines a language or multiple languages of the request body.

  • If the Content-Language header 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-Language header is set to a specific language, the localized fields should be provided as strings.
  • If the Content-Language header is empty, the endpoint will assume that the localized fields are provided in the default language or 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 will be rejected.

Body
all ofOptional
Responses
204
No Content
400
Bad request due to validation, incorrect parameters, etc.
application/json
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
404
Resource has not been found.
application/json
409
There are three possible reasons: 1. Product with given code already exists, please choose unique code for your product 2. 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. 3. 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.
application/json
500
Internal Server Error.
application/json
put
PUT /product/{tenant}/product-templates/{product-template-id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 249

{
  "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
  }
}

No content