All pages
Powered by GitBook
1 of 9

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Custom Instance

Retrieving all custom instances

get

Retrieves all custom instances associated with a specific custom schema type.


Required scopes

  • schema.custominstance_read - required for retrieving custom instances

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

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

If the sorting direction is not specified, the fields are sorted in ascending order.

qstringOptional

A standard query parameter is used to search for specific values.

  • Searching for items by string-based properties:
    • By a field value: q=siteCode:main, where siteCode is the field name, and main is its desired value.
    • By a localized field value: q=items.product.name.en:apple_lobo, where name is the field name of product, en is the language code, and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key is the language code and value is the translation to particular language.
  • Searching for items by a number-based property:
    • With a specific value: q=items.quantity.quantity:20
    • With a value greater than: q=items.quantity.quantity:>20
    • With a value lower than: q=items.quantity.quantity:<20
    • With a value greater than or equal to: q=items.quantity.quantity:>=20
    • With a value lower than or equal to: q=items.quantity.quantity:<=20
    • With a value within a range of values: q=items.quantity.quantity:(>=10 AND <=20)
      where items.quantity.quantity is the name of the number-based field, and 20 is its querying value.
  • Searching for items by a date-based property: All number-based property queries are also valid for dates. In that case, the date should be placed within double quotes: q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
  • Searching for items by a boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name, and true is its desired value.
  • Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null.
  • Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f siteCode:main where id and siteCode are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in the format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=siteCode:~ain or q=code:(~U PL) - in case of searching for strings with space, where siteCode is the name of the field, and ain or U PL is its querying regex.
  • Searching for items with a localized string-based property conforming to a regex: items.product.name.en:~(Yoghurt im) - where name is the product field name, en is the desired language, and Joghurt im is the search term.
Example: siteCode:{main}
fieldsstringOptional

Fields to be included in the response.

expandstringOptional

Fetches data about expanded references. You can provide full path to the reference, use wildcard character *, or provide a specific index (starting with 0) in array of references. Multiple paths can be specified by separating them with commas.

Examples:

  • customAttributes.references.product_reference - expands a specific reference
  • * - expands all references
  • customAttributes.* - expands all references within customAttributes
  • customAttributes.references.customers_array.0 - expands the first element in an array of references
get
/schema/{tenant}/custom-entities/{type}/instances

Creating a custom instance

post

Creates a custom instance entity associated with given custom schema type.


Required scopes

  • schema.custominstance_manage - required for creating a custom instance

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Query parameters
validateReferencesbooleanOptional

When set to true, references are validated if the provided resources exist. If set to false, validation is skipped.

Default: true
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
post
/schema/{tenant}/custom-entities/{type}/instances

Retrieving a custom instance

get

Retrieves a single custom instance by id.


Required scopes

  • schema.custominstance_read - required for retrieving a custom instance

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
idstringRequired

Unique identifier of the entity.

Query parameters
expandstringOptional

Fetches data about expanded references. You can provide full path to the reference, use wildcard character *, or provide a specific index (starting with 0) in array of references. Multiple paths can be specified by separating them with commas.

Examples:

  • customAttributes.references.product_reference - expands a specific reference
  • * - expands all references
  • customAttributes.* - expands all references within customAttributes
  • customAttributes.references.customers_array.0 - expands the first element in an array of references
get
/schema/{tenant}/custom-entities/{type}/instances/{id}

Upserting a custom instance

put

Performs the UPSERT operation. If a custom instance with specified ID exists in the system, then it is updated. If it doesn't exist, a new custom instance is created.

Required scopes

  • schema.custominstance_manage - required for upserting a custom instance

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
idstringRequired

Unique identifier of the entity.

Query parameters
validateReferencesbooleanOptional

When set to true, references are validated if the provided resources exist. If set to false, validation is skipped.

Default: true
Header parameters
put
/schema/{tenant}/custom-entities/{type}/instances/{id}

Deleting a custom instance

delete

Deletes a custom instance.


Required scopes

  • schema.custominstance_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
idstringRequired

Unique identifier of the entity.

Responses
204

No content

401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
delete
/schema/{tenant}/custom-entities/{type}/instances/{id}

Patching a custom instance

patch

The patch request consists of set of operation, that should be defined according to RFC-6902 standard.

Required scopes

  • schema.custominstance_manage - required for patching a custom instance

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
idstringRequired

Unique identifier of the entity.

Query parameters
validateReferencesbooleanOptional

When set to true, references are validated if the provided resources exist. If set to false, validation is skipped.

Default: true
Header parameters
patch
/schema/{tenant}/custom-entities/{type}/instances/{id}

Searching for custom instances

post

Returns all custom instances for provided type that match specified criteria.


Required scopes

  • schema.custominstance_read - required for retrieving custom instances

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

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

If the sorting direction is not specified, the fields are sorted in ascending order.

fieldsstringOptional

Fields to be included in the response.

expandstringOptional

Fetches data about expanded references. You can provide full path to the reference, use wildcard character *, or provide a specific index (starting with 0) in array of references. Multiple paths can be specified by separating them with commas.

Examples:

  • customAttributes.references.product_reference - expands a specific reference
  • * - expands all references
  • customAttributes.* - expands all references within customAttributes
  • customAttributes.references.customers_array.0 - expands the first element in an array of references
post
/schema/{tenant}/custom-entities/{type}/instances/search

Creating custom instances in bulk

post

Creates multiple custom instances.


Required scopes

  • schema.custominstance_manage - required for creating custom instances

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Query parameters
validateReferencesbooleanOptional

When set to true, references are validated if the provided resources exist. If set to false, validation is skipped.

Default: false
Bodyobject[]
post
/schema/{tenant}/custom-entities/{type}/instances/bulk

Upserting custom instances in bulk

put

Upserts multiple custom instances.


Required scopes

  • schema.custominstance_manage - required for upserting custom instances

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Query parameters
validateReferencesbooleanOptional

When set to true, references are validated if the provided resources exist. If set to false, validation is skipped.

Default: false
Bodyall of[]
put
/schema/{tenant}/custom-entities/{type}/instances/bulk

Deleting custom instances in bulk

delete

Removes multiple custom instances.

The IDs of items should be defined in the request body as an array of strings.

Example: ["firstId", "secondId", "thirdId"]


Required scopes

  • schema.custominstance_manage - required for deleting custom instances

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Custom schema type to which custom instance is associated

Example: CUSTOM_DOCUMENT
Responses
207

Bulk operation was successful

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
delete
/schema/{tenant}/custom-entities/{type}/instances/bulk
Header parameters
X-Total-CountbooleanOptional

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

Default: falseExample: true
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
400

Unsupported language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
Body
idstringOptional

Id of the custom instance.

nameobjectOptional

Localized custom type name in a form of a map of translations.

mixinsstringOptional

A key-value map of additional attributes.

Responses
201

Custom instance was successfully created.

application/json
400

Mixins validation failed.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Conflict.

application/json
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
nameobjectOptional

Localized custom type name in a form of a map of translations.

mixinsstringOptional

A key-value map of additional attributes.

Responses
201

Custom instance was successfully created.

application/json
204

Custom instance was successfully updated

400

Mixins validation failed.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Conflict.

application/json

No content

No content

Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Bodyobject[]
opstring · enumRequired

Indicates an operation which should be done on a return. Available operations: add remove and replace

Possible values:
pathstringRequired

Indicates a path for which the value should be applied. For example:/mixins/additionalAttributes/externalId or /name

valueone ofOptional

Indicates a value that should be changed or added. The value can be of a primitive type, like string, number, boolean or it can be an object or an array.

objectOptional
or
stringOptional
or
numberOptional
Responses
204

Custom instance was successfully patched

400

Mixins validation failed.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json

No content

Header parameters
X-Total-CountbooleanOptional

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

Default: falseExample: true
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Body
qstringOptional

A standard query parameter used to search for specific values.

Responses
200

Custom instances succesfully retrieved

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
idstringOptional

Id of the custom instance.

nameobjectOptional

Localized custom type name in a form of a map of translations.

mixinsstringOptional

A key-value map of additional attributes.

Responses
207

Bulk operation was successful

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
Responses
207

Bulk operation was successful

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "type": "CUSTOM_DOCUMENT",
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "populatirty": 1
      }
    },
    "media": [
      "media_id_1",
      "media_id_2"
    ],
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
      },
      "createdAt": "2025-04-17T13:00:00.000Z",
      "modifiedAt": "2025-05-14T13:00:00.000Z",
      "version": 3
    }
  },
  {
    "id": "456",
    "name": {
      "en": "Manual"
    },
    "type": "CUSTOM_DOCUMENT",
    "media": [
      "media_id_3"
    ],
    "metadata": {
      "createdAt": "2025-04-17T13:00:00.000Z",
      "modifiedAt": "2025-04-17T13:00:00.000Z",
      "version": 1
    }
  }
]
POST /schema/{tenant}/custom-entities/{type}/instances HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 254

{
  "id": "123",
  "name": {
    "en": "Report"
  },
  "mixins": {
    "productCustomAttributes": {
      "inStock": true,
      "popularity": 1
    }
  },
  "metadata": {
    "mixins": {
      "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
    }
  }
}
{
  "id": "123"
}
{
  "id": "123",
  "name": {
    "en": "Report"
  },
  "type": "CUSTOM_DOCUMENT",
  "mixins": {
    "productCustomAttributes": {
      "inStock": true,
      "populatirty": 1
    }
  },
  "media": [
    "media_id_1",
    "media_id_2"
  ],
  "metadata": {
    "mixins": {
      "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
    },
    "createdAt": "2025-04-17T13:00:00.000Z",
    "modifiedAt": "2025-05-14T13:00:00.000Z",
    "version": 3
  }
}
PUT /schema/{tenant}/custom-entities/{type}/instances/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 256

{
  "name": {
    "en": "Report"
  },
  "mixins": {
    "productCustomAttributes": {
      "inStock": false,
      "popularity": 2
    }
  },
  "metadata": {
    "mixins": {
      "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
    },
    "version": 1
  }
}
{
  "id": "123"
}
PATCH /schema/{tenant}/custom-entities/{type}/instances/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 59

[
  {
    "op": "replace",
    "path": "/name",
    "value": {
      "en": "New name"
    }
  }
]
POST /schema/{tenant}/custom-entities/{type}/instances/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "q": "mixins.productCustomAttributes.inStock:true"
}
[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "type": "CUSTOM_DOCUMENT",
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "populatirty": 1
      }
    },
    "media": [
      "media_id_1",
      "media_id_2"
    ],
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
      },
      "createdAt": "2025-04-17T13:00:00.000Z",
      "modifiedAt": "2025-05-14T13:00:00.000Z",
      "version": 3
    }
  }
]
POST /schema/{tenant}/custom-entities/{type}/instances/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 292

[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "popularity": 1
      }
    },
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
      }
    }
  },
  {
    "id": "456",
    "name": {
      "en": "Manual"
    }
  }
]
[
  {
    "index": 0,
    "code": 201,
    "status": "Created"
  },
  {
    "index": 1,
    "code": 409,
    "status": "Conflict",
    "message": "Custom instance with id='456' already exists for type='CUSTOM'"
  }
]
[
  {
    "index": 0,
    "code": 201,
    "status": "Created"
  },
  {
    "index": 1,
    "code": 204,
    "status": "No Content"
  }
]
[
  {
    "index": 0,
    "code": 204,
    "status": "No Content"
  },
  {
    "index": 1,
    "code": 204,
    "status": "No Content"
  }
]
DELETE /schema/{tenant}/custom-entities/{type}/instances/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
PUT /schema/{tenant}/custom-entities/{type}/instances/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 292

[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "popularity": 1
      }
    },
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/productCustomAttributesMixIn-v38.json"
      }
    }
  },
  {
    "id": "456",
    "name": {
      "en": "Manual"
    }
  }
]
DELETE /schema/{tenant}/custom-entities/{type}/instances/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /schema/{tenant}/custom-entities/{type}/instances HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /schema/{tenant}/custom-entities/{type}/instances/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

API Reference

Custom Schema Type

Retrieving all custom schema types

get

Retrieves all custom schema types.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

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

If the sorting direction is not specified, the fields are sorted in ascending order.

qstringOptional

A standard query parameter is used to search for specific values.

  • Searching for items by string-based properties:
    • By a field value: q=siteCode:main, where siteCode is the field name, and main is its desired value.
    • By a localized field value: q=items.product.name.en:apple_lobo, where name is the field name of product, en is the language code, and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key is the language code and value is the translation to particular language.
  • Searching for items by a number-based property:
    • With a specific value: q=items.quantity.quantity:20
    • With a value greater than: q=items.quantity.quantity:>20
    • With a value lower than: q=items.quantity.quantity:<20
    • With a value greater than or equal to: q=items.quantity.quantity:>=20
    • With a value lower than or equal to: q=items.quantity.quantity:<=20
    • With a value within a range of values: q=items.quantity.quantity:(>=10 AND <=20)
      where items.quantity.quantity is the name of the number-based field, and 20 is its querying value.
  • Searching for items by a date-based property: All number-based property queries are also valid for dates. In that case, the date should be placed within double quotes: q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
  • Searching for items by a boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name, and true is its desired value.
  • Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null.
  • Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f siteCode:main where id and siteCode are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in the format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=siteCode:~ain or q=code:(~U PL) - in case of searching for strings with space, where siteCode is the name of the field, and ain or U PL is its querying regex.
  • Searching for items with a localized string-based property conforming to a regex: items.product.name.en:~(Yoghurt im) - where name is the product field name, en is the desired language, and Joghurt im is the search term.
Example: siteCode:{main}
fieldsstringOptional

Fields to be included in the response.

expandSchemasbooleanOptional

Determines whether the response will include information about associated schemas.

Default: false
Header parameters
X-Total-CountbooleanOptional

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

Default: falseExample: true
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
get
/schema/{tenant}/custom-entities

Creating a custom schema type

post

Creates a custom type entity that can be later used for creating custom instances.


Required scopes

  • schema.schema_manage - required for creating a custom schema type

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
idstringRequired

Unique code for the custom type. Can only contain uppercase letters and underscores.

nameobjectRequired

Localized custom type name in a form of a map of translations.

post
/schema/{tenant}/custom-entities

Retrieving a custom schema type

get

Retrieves a single custom schema type by id.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique id of the custom type.

Query parameters
expandSchemasbooleanOptional

Determines whether the response will include information about associated schemas.

Default: false
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
get
/schema/{tenant}/custom-entities/{id}

Upserting a custom schema type

put

Performs the UPSERT operation. If a custom schema type with specified ID exists in the system, then it is updated. If it doesn't exist, a new type is created.

Required scopes

  • schema.schema_manage - required for upserting custom schema type

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique id of the custom type.

Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
put
/schema/{tenant}/custom-entities/{id}

Deleting a custom schema type

delete

Deletes a single custom type. This operation will fail if there are schemas or custom instances assigned to this custom type.


Required scopes

  • schema.schema_manage - required for removing custom schema type

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique id of the custom type.

Responses
204

Custom schema type was succefully removed

400

Bad request. This may happen when there are schemas or custom instances associated with this custom type.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
delete
/schema/{tenant}/custom-entities/{id}
Responses
201

The request was successful. Custom schema type has been created.

application/json
400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Conflict.

application/json
nameobjectRequired

Localized custom type name in a form of a map of translations.

Responses
201

Custom schema type was successfully created.

application/json
204

Custom schema type was successfully updated.

400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Version validation failed.

application/json

No content

[
  {
    "id": "CUSTOM_PRODUCT",
    "name": {
      "en": "Custom Product Type"
    },
    "metadata": {
      "createdAt": "2023-08-09T09:21:42.693Z",
      "modifiedAt": "2023-08-09T09:21:42.693Z",
      "version": 1
    }
  },
  {
    "code": "DOCUMENT",
    "name": {
      "en": "Documents"
    },
    "metadata": {
      "createdAt": "2023-08-10T10:15:30.123Z",
      "modifiedAt": "2023-08-19T10:15:30.123Z",
      "version": 2
    }
  }
]
POST /schema/{tenant}/custom-entities HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "id": "CUSTOM_PRODUCT",
  "name": {
    "en": "Custom Product Type"
  }
}
{
  "id": "CUSTOM_PRODUCT"
}
{
  "id": "CUSTOM_PRODUCT",
  "name": {
    "en": "Custom Product Type"
  },
  "metadata": {
    "createdAt": "2023-08-09T09:21:42.693Z",
    "modifiedAt": "2023-08-09T09:21:42.693Z",
    "version": 1
  }
}
PUT /schema/{tenant}/custom-entities/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "name": {
    "en": "Updated Custom Type"
  },
  "metadata": {
    "version": 1
  }
}
{
  "id": "CUSTOM_PRODUCT"
}
GET /schema/{tenant}/custom-entities/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /schema/{tenant}/custom-entities/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /schema/{tenant}/custom-entities HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Schema

Retrieving all schemas

get

Retrieves all schemas. You can filter the results with query parameters.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

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

If the sorting direction is not specified, the fields are sorted in ascending order.

qstringOptional

A standard query parameter is used to search for specific values.

  • Searching for items by string-based properties:
    • By a field value: q=siteCode:main, where siteCode is the field name, and main is its desired value.
    • By a localized field value: q=items.product.name.en:apple_lobo, where name is the field name of product, en is the language code, and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key is the language code and value is the translation to particular language.
  • Searching for items by a number-based property:
    • With a specific value: q=items.quantity.quantity:20
    • With a value greater than: q=items.quantity.quantity:>20
    • With a value lower than: q=items.quantity.quantity:<20
    • With a value greater than or equal to: q=items.quantity.quantity:>=20
    • With a value lower than or equal to: q=items.quantity.quantity:<=20
    • With a value within a range of values: q=items.quantity.quantity:(>=10 AND <=20)
      where items.quantity.quantity is the name of the number-based field, and 20 is its querying value.
  • Searching for items by a date-based property: All number-based property queries are also valid for dates. In that case, the date should be placed within double quotes: q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
  • Searching for items by a boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name, and true is its desired value.
  • Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null.
  • Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f siteCode:main where id and siteCode are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in the format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=siteCode:~ain or q=code:(~U PL) - in case of searching for strings with space, where siteCode is the name of the field, and ain or U PL is its querying regex.
  • Searching for items with a localized string-based property conforming to a regex: items.product.name.en:~(Yoghurt im) - where name is the product field name, en is the desired language, and Joghurt im is the search term.
Example: siteCode:{main}
fieldsstringOptional

Fields to be included in the response.

typestringOptional

Filters schemas by type. Possible types to specify, CART, CATEGORY, COMPANY, COUPON, CUSTOMER, CUSTOMER.ADDRESS, ORDER, PRODUCT, QUOTE, RETURN, PRICE_LIST, SITE, CUSTOM_ENTITY, VENDOR. When the newest version of the schema is of different type than the previous one and the previous one matches the type specified in this query param, then the previous version is returned.

Header parameters
X-Total-CountbooleanOptional

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

Default: falseExample: true
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
400

Unsupported language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
get
/schema/{tenant}/schemas

Creating a schema

post

Creates a schema entity and generates json-schema representation which is then uploaded to cloudinary repository.


Required scopes

  • schema.schema_manage - required for creating a schema

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
post
/schema/{tenant}/schemas

Retrieving a schema

get

Retrieves a single schema.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
Responseall of
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
get
/schema/{tenant}/schemas/{id}

Updating a schema

put

Updates a single schema. Each update releases a new version of json schema file.

Required scopes

  • schema.schema_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
put
/schema/{tenant}/schemas/{id}

Deleting a schema

delete

Deletes a single schema. It deletes just a database entry. The cloudinary reference file remains untouched.


Required scopes

  • schema.schema_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Responses
204

No content

401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
delete
/schema/{tenant}/schemas/{id}

Providing a file

post

Validates and parses provided json schema file. When the file is valid, it returns a json which can be used either to create a new schema via POST operation or to update an existing one via PUT operation when all the missing fields are provided. It doesn't create any file and it doesn't crease a database entity.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
fileobject · jsonRequired

Content of the file.

idstringOptional

Id of the existing schema. Should be null when there is no existing schema.

Responses
200

The request was successful. The file was validated and parsed correctly.

application/json
400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
post
/schema/{tenant}/schemas/file
Responses
201

The request was successful. The Schema has been created.

application/json
400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Conflict.

application/json
Responses
204

No content

400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
409

Conflict.

application/json

No content

No content

[
  {
    "id": "64d35aa7fa54121ca47db657",
    "name": {
      "en": "Product Custom Attributes"
    },
    "attributes": [
      {
        "key": "weight",
        "name": {
          "en": "Weight of a product"
        },
        "description": {
          "en": "The exact weight of a product in grams."
        },
        "type": "NUMBER",
        "metadata": {
          "readOnly": true,
          "localized": false,
          "required": true
        }
      }
    ],
    "types": [
      "PRODUCT"
    ],
    "metadata": {
      "version": 1,
      "createdAt": "2023-08-09T09:21:42.693Z",
      "modifiedAt": "2023-08-09T09:21:42.693Z",
      "url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
    }
  }
]
POST /schema/{tenant}/schemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 685

{
  "name": {
    "en": "Product Custom Attributes"
  },
  "types": [
    "PRODUCT"
  ],
  "attributes": [
    {
      "key": "weight",
      "name": {
        "en": "Weight of a product"
      },
      "description": {
        "en": "The exact weight of a product in grams."
      },
      "type": "TEXT",
      "metadata": {
        "readOnly": true,
        "required": true
      }
    },
    {
      "key": "size",
      "name": {
        "en": "Size of a product"
      },
      "description": {
        "en": "The exact size of a product. Possible values are S, M, L."
      },
      "type": "ENUM",
      "metadata": {
        "readOnly": true,
        "required": true
      },
      "values": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    },
    {
      "key": "advertisement",
      "name": {
        "en": "Advertisement of a product"
      },
      "description": {
        "en": "A localized advertisement of a product."
      },
      "type": "TEXT",
      "metadata": {
        "localized": true,
        "required": true
      }
    }
  ]
}
{
  "id": "e241dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}
{
  "id": "64d35aa7fa54121ca47db657",
  "name": {
    "en": "Product Custom Attributes"
  },
  "attributes": [
    {
      "key": "weight",
      "name": {
        "en": "Weight of a product"
      },
      "description": {
        "en": "The exact weight of a product in grams."
      },
      "type": "NUMBER",
      "metadata": {
        "readOnly": true,
        "localized": false,
        "required": true
      }
    }
  ],
  "types": [
    "PRODUCT"
  ],
  "metadata": {
    "version": 1,
    "createdAt": "2023-08-09T09:21:42.693Z",
    "modifiedAt": "2023-08-09T09:21:42.693Z",
    "url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
  }
}
PUT /schema/{tenant}/schemas/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 710

{
  "name": {
    "en": "Product Custom Attributes"
  },
  "types": [
    "PRODUCT"
  ],
  "attributes": [
    {
      "key": "weight",
      "name": {
        "en": "Weight of a product"
      },
      "description": {
        "en": "The exact weight of a product in grams."
      },
      "type": "TEXT",
      "metadata": {
        "readOnly": true,
        "required": true
      }
    },
    {
      "key": "size",
      "name": {
        "en": "Size of a product"
      },
      "description": {
        "en": "The exact size of a product. Possible values are S, M, L."
      },
      "type": "ENUM",
      "metadata": {
        "readOnly": true,
        "required": true
      },
      "values": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    },
    {
      "key": "advertisement",
      "name": {
        "en": "Advertisement of a product"
      },
      "description": {
        "en": "A localized advertisement of a product."
      },
      "type": "TEXT",
      "metadata": {
        "localized": true,
        "required": true
      }
    }
  ],
  "metadata": {
    "version": 1
  }
}
{
  "id": "64d35aa7fa54121ca47db657",
  "name": {
    "en": "Product Custom Attributes"
  },
  "attributes": [
    {
      "key": "weight",
      "type": "NUMBER",
      "metadata": {
        "readOnly": true,
        "localized": false,
        "required": true
      }
    }
  ],
  "metadata": {
    "version": 1
  }
}
GET /schema/{tenant}/schemas/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /schema/{tenant}/schemas/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
POST /schema/{tenant}/schemas/file HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 23

{
  "file": {},
  "id": "text"
}
GET /schema/{tenant}/schemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Type

Updating types of a schema

put

Updates assigned types to the schema. It's allowed to change the assigned types to the newest schema as well as to the previous versions of the schema. This operation does not generate a new version of the schema.

Required scopes

  • schema.schema_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerRequired

Version of the entity.

modestring · enumOptional

Defines how types assigned to given schema should be resolved. REPLACE is a default value. REPLACE takes provided types and replaces the existing ones with it. ADD adds provided types to the existing ones. REMOVE removes provided types from the existing ones.

Default: REPLACEPossible values:
put
/schema/{tenant}/schemas/{id}/types

Retrieving types

get

Retrieves types which have at least one schema assigned.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200Success
application/json
Responsestring[]
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
get
/schema/{tenant}/types
Bodystring · enum[]

List of types to which assign the schema.

itemsstring · enumOptional

Type which the schema should be assigned to. Can be one of the predefined values or any custom schema type id.

Possible values:
Responses
204

No content

400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json

No content

PUT /schema/{tenant}/schemas/{id}/types?version=1 HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

[
  "PRODUCT",
  "ORDER"
]
GET /schema/{tenant}/types HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  "ORDER",
  "PRODUCT",
  "QUOTE"
]

Models

Schema Service

Manage the mixins schemas for miscellaneous types.

Key features and benefits

  • Uploads JSON files to create schemas for objects like product, order, quotes, customer, customer.address, company, coupon, returns, category, price_list, and custom_entity

  • Supports mixin localization

  • Allows easy and quick creation of custom mixins

  • Supports the following field types: Array, Boolean, Date, Date Time, Decimal, Enum, Number, Object, Text and Time

Reference

Retrieving all references

get

Retrieves all references. You can filter the results with query parameters.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by colons. The order of properties indicates their priority in sorting.

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

If the sorting direction is not specified, the fields are sorted in ascending order.

qstringOptional

A standard query parameter is used to search for specific values.

  • Searching for items by string-based properties:
    • By a field value: q=siteCode:main, where siteCode is the field name, and main is its desired value.
    • By a localized field value: q=items.product.name.en:apple_lobo, where name is the field name of product, en is the language code, and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key is the language code and value is the translation to particular language.
  • Searching for items by a number-based property:
    • With a specific value: q=items.quantity.quantity:20
    • With a value greater than: q=items.quantity.quantity:>20
    • With a value lower than: q=items.quantity.quantity:<20
    • With a value greater than or equal to: q=items.quantity.quantity:>=20
    • With a value lower than or equal to: q=items.quantity.quantity:<=20
    • With a value within a range of values: q=items.quantity.quantity:(>=10 AND <=20)
      where items.quantity.quantity is the name of the number-based field, and 20 is its querying value.
  • Searching for items by a date-based property: All number-based property queries are also valid for dates. In that case, the date should be placed within double quotes: q=metadataCreatedAt:(>="2021-05-18T07:27:27.455Z" AND <"2021-05-20T07:27:27.455Z")
  • Searching for items by a boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name, and true is its desired value.
  • Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null.
  • Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f siteCode:main where id and siteCode are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in the format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=siteCode:~ain or q=code:(~U PL) - in case of searching for strings with space, where siteCode is the name of the field, and ain or U PL is its querying regex.
  • Searching for items with a localized string-based property conforming to a regex: items.product.name.en:~(Yoghurt im) - where name is the product field name, en is the desired language, and Joghurt im is the search term.
Example: siteCode:{main}
fieldsstringOptional

Fields to be included in the response.

typestringOptional

Filters references by type. Possible types to specify, CART, CATEGORY, COMPANY, COUPON, CUSTOMER, CUSTOMER_ADDRESS, ORDER, PRODUCT, QUOTE, RETURN, PRICE_LIST, SITE, CUSTOM_ENTITY, VENDOR. When the newer version of a reference is of different type than the previous one and the previous one matches the type specified in this query param, then the previous version is returned.

Header parameters
X-Total-CountbooleanOptional

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

Default: falseExample: true
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
400

Unsupported language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
get
/schema/{tenant}/references

Creating a reference

post

Creates a reference entity and uploads provided file to the cloudinary repository.


Required scopes

  • schema.schema_manage - required for creating a reference

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
fileobject · jsonRequired

Content of the file.

bodyall ofRequired
post
/schema/{tenant}/references

Retrieving a reference

get

Retrieves a single reference.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.

  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service.
Responses
200Success
application/json
Responseall of
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
get
/schema/{tenant}/references/{id}

Updating a reference

put

Updates a single reference.

Required scopes

  • schema.schema_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Header parameters
Content-LanguagestringOptional

The Content-Language request HTTP header defines language(s) of the payload.

Example: de
Body
put
/schema/{tenant}/references/{id}

Deleting a reference

delete

Deletes a single reference. It deletes just a database entry. The cloudinary reference file remains untouched.


Required scopes

  • schema.schema_manage

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: Always write the tenant name in lowercase.

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

Unique identifier of the entity.

Query parameters
versionintegerOptional

Version of the entity.

Example: 1
Responses
204

No content

401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
delete
/schema/{tenant}/references/{id}
Responses
201

The request was successful. The Reference has been created.

application/json
400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
409

Conflict.

application/json
fileobject · jsonRequired

Content of the file.

bodyall ofRequired
Responses
204

No content

400

Unsupported content language provided.

application/json
401

Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.

application/json
403

Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.

application/json
404

Given resource cannot be found.

application/json
409

Conflict.

application/json

No content

No content

No content

[
  {
    "id": "64d35aa7fa54121ca47db657",
    "name": {
      "en": "Product Custom Attributes"
    },
    "types": [
      "PRODUCT"
    ],
    "metadata": {
      "version": 1,
      "createdAt": "2023-08-09T09:21:42.693Z",
      "modifiedAt": "2023-08-09T09:21:42.693Z",
      "url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
    }
  }
]
POST /schema/{tenant}/references HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 198

{
  "file": {
    "externalValue": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/653a30c0951b2b0665884f89_v1.json"
  },
  "body": {
    "name": {
      "en": "Product Custom Attributes"
    },
    "types": [
      "PRODUCT"
    ]
  }
}
{
  "id": "e241dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}
{
  "id": "64d35aa7fa54121ca47db657",
  "name": {
    "en": "Product Custom Attributes"
  },
  "types": [
    "PRODUCT"
  ],
  "metadata": {
    "version": 1,
    "createdAt": "2023-08-09T09:21:42.693Z",
    "modifiedAt": "2023-08-09T09:21:42.693Z",
    "url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/64d35aa7fa54121ca47db657_v1.json"
  }
}
GET /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
PUT /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 223

{
  "file": {
    "externalValue": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/653a30c0951b2b0665884f89_v1.json"
  },
  "body": {
    "name": {
      "en": "Product Custom Attributes"
    },
    "types": [
      "PRODUCT"
    ],
    "metadata": {
      "version": 1
    }
  }
}
DELETE /schema/{tenant}/references/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
GET /schema/{tenant}/references HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Schema Tutorial

With the Schema Service you can easily create and manage customized/industry-specific fields for different types in Management Dashboard. The new fields appear in a separate tab when you create an instance of the extended type.

Supported entity types for schema creation

When creating a mixin schema through the Schema Service API, you can select from the following entity types: cart, category, company, coupon, customer, customer_address, custom_entity, order, price_list, product, quote, return, site, and vendor.

Important distinction: The list above shows which entity types support mixin schema creation through the Schema Service API. However, many additional APIs accept mixins in their requests and responses even though you cannot create schemas for them through this service. For example, the Order API, Checkout API, Availability API, and Shopping List API all support mixins, but you need to create mixin schemas manually (as JSON schemas) and reference them when using those APIs. See the page for a complete list of APIs that support mixins.

How to add custom fields for an entity

This tutorial explains how to add custom fields for a product entity.

Create a schema

To extend the product entity in Management Dashboard with some industry-specific fields, create a schema that defines the required fields and generates JSON file representation by sending a request to the endpoint.

Request result is the new schema ID - "id": "6915ec3c047dc4456d86a26f".

Retrieve a schema

Retrieve the created schema to get the schema URL by calling the endpoint.

In the response, you can see the URL link to cloudinary repository, where the schema for the product type has been uploaded.

When you create a product, the validation mechanism runs against the schema stored under the mentioned cloudinary URL.

Create a product

Now, create a product that contains additional fields by sending a request to endpoint.

The product should contain "metadata.mixins.{{id}}: {{cloudinaryUrl}}", where id is the schema URL you retrieved with GET operation in the previous step.

For example, you created a schema with size attribute and it got assigned a schema id: 6915ec3c047dc4456d86a26f. When creating or editing a product, provide the schema id and URL details in the payload of the POST request:

The product you created has already the custom fields added in the separate Product Custom Attributes tab.

How to create a more complex schema

In case you need to add a schema for more complex attribute types than those supported by default, instead of creating a schema, you can create a reference. This tutorial shows you how to upload more complex schemas.

Prepare a JSON schema definition

See the example JSON file that defines fields of different types:

Create a reference

To use the schema in Emporix Commerce Engine, send a request to the endpoint. This action creates a reference to your schema so that you use the extended type. The schema reference is used to create or edit product objects.

Note that the fields of types that are not supported by default are not displayed in the Management Dashboard. You can edit them by API requests.

CURL request example:

JSON example:

Create a product

Now, create a product and provide values for the customized fields by sending a request to endpoint.

See the example payload for creating a product basing on the schema from the previous step:

Mixins standard practices
Creating a schema
API Reference
Retrieving a schema
API Reference
Creating a new product
Creating a reference
API Reference
Creating a new product
curl -L 
  --request POST 
  --url 'https://api.emporix.io/schema/{tenant}/schemas' 
  --header 'Authorization: Bearer YOUR_OAUTH2_TOKEN' 
  --header 'Content-Type: application/json' 
  --data '{
    "name": {
      "en": "Product Custom Attributes"
    },
    "types": [
      "PRODUCT"
    ],
    "attributes": [
      {
        "key": "weight",
        "name": {
          "en": "Weight of a product"
        },
        "description": {
          "en": "The exact weight of a product in grams."
        },
        "type": "TEXT",
        "metadata": {
          "readOnly": true,
          "required": true
        }
      },
      {
        "key": "size",
        "name": {
          "en": "Size of a product"
        },
        "description": {
          "en": "The exact size of a product. Possible values are S, M, L."
        },
        "type": "ENUM",
        "metadata": {
          "readOnly": true,
          "required": true
        },
        "values": [
          {
            "value": "S"
          },
          {
            "value": "M"
          },
          {
            "value": "L"
          }
        ]
      },
      {
        "key": "advertisement",
        "name": {
          "en": "Advertisement of a product"
        },
        "description": {
          "en": "A localized advertisement of a product."
        },
        "type": "TEXT",
        "metadata": {
          "localized": true,
          "required": true
        }
      }
    ]
  }'
curl -L 
  --url 'https://api.emporix.io/schema/{tenant}/schemas/{id}' 
  --header 'Authorization: Bearer YOUR_OAUTH2_TOKEN' 
  --header 'Accept: */*'
{
  "id": "6915ec3c047dc4456d86a26f",
  "name": {
    "en": "Product Custom Attributes"
  },
  "attributes": [
    {
      "key": "weight",
      "name": {
        "en": "Weight of a product"
      },
      "description": {
        "en": "The exact weight of a product in grams."
      },
      "type": "TEXT",
      "metadata": {
        "readOnly": true,
        "localized": false,
        "required": true,
        "nullable": false
      }
    },
    {
      "key": "size",
      "name": {
        "en": "Size of a product"
      },
      "description": {
        "en": "The exact size of a product. Possible values are S, M, L."
      },
      "type": "ENUM",
      "metadata": {
        "readOnly": true,
        "localized": false,
        "required": true,
        "nullable": false
      },
      "values": [
        {
          "value": "S"
        },
        {
          "value": "M"
        },
        {
          "value": "L"
        }
      ]
    },
    {
      "key": "advertisement",
      "name": {
        "en": "Advertisement of a product"
      },
      "description": {
        "en": "A localized advertisement of a product."
      },
      "type": "TEXT",
      "metadata": {
        "readOnly": false,
        "localized": true,
        "required": true,
        "nullable": false
      }
    }
  ],
  "types": [
    "PRODUCT"
  ],
  "metadata": {
    "version": 1,
    "createdAt": "2025-11-13T14:33:32.059Z",
    "modifiedAt": "2025-11-13T14:33:32.059Z",
    "url": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/featuredemo/6915ec3c047dc4456d86a26f_v1.json"
  }
}
{
  "mixins": {
    "6915ec3c047dc4456d86a26f": {
      "size": 6557
    }
  },
  "metadata": {
    "mixins": {
      "6915ec3c047dc4456d86a26f": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/featuredemo/6915ec3c047dc4456d86a26f_v1.json"
    }
  }
}
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "description": "Schema for mixins for custom attributes at products.",
  "properties": {
    "storageCapacity": {
      "type": "string",
      "description": "Storage Capacity. Rules: Must be one of the following values: '128 GB', '256 GB', '512 GB', '1000 GB'.",
      "enum": ["128 GB", "256 GB", "512 GB", "1000 GB"]
    },
    "color": {
      "type": "string",
      "description": "Color. Rules: Must be one of the following values: 'Black', 'Blue', 'Natural', 'White'.",
      "enum": ["Black", "Blue", "Natural", "White"]
    },
    "memory": {
      "type": "string",
      "description": "Memory. Rules: Can only be '8 GB'.",
      "enum": ["8 GB"]
    },
    "displaySize": {
      "type": "string",
      "description": "Display Size. Rules: Must follow the format of '[number]\"' (e.g. '5.5\"').",
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?\"$"
    },
    "imageResolution": {
      "type": "string",
      "description": "Image Resolution. Rules: Must follow the format of '[width] x [height] pixels'.",
      "pattern": "^[0-9]+ x [0-9]+ pixels$"
    },
    "iOSOperatingSystem": {
      "type": "boolean",
      "description": "iOS Operating System. Rules: Must be a boolean (true or false)."
    },
    "capacity": {
      "type": "string",
      "description": "Capacity. Rules: Must follow the format '[number] mAh'.",
      "pattern": "^[0-9]+ mAh$"
    },
    "itemNumber": {
      "type": "number",
      "description": "Item Number. Rules: Must be a number between 0 and 99999999 inclusive.",
      "minimum": 0,
      "maximum": 99999999
    },
    "manufacturerNo": {
      "type": "string",
      "description": "Manufacturer No. Rules: Cannot exceed 10 characters in length.",
      "maxLength": 10
    },
    "releaseDate": {
      "type": "string",
      "description": "Release Date. Rules: Must be in the format 'YYYY-MM-DD'.",
      "format": "date",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    },
    "salesRank": {
      "type": "object",
      "description": "Sales Rank. Rules: 1. 'total' can be set and 'rank' can be empty. 2. When 'rank' is set, 'total' also has to be set.",
      "properties": {
        "rank": {
          "type": "number",
          "minimum": 1
        },
        "total": {
          "type": "number",
          "minimum": 1
        }
      },
      "dependencies": {
        "rank": ["total"]
      }
    },
    "externalLinks": {
      "type": "string",
      "description": "External Links. Rules: Must be a valid URI starting with 'http://' or 'https://'.",
      "format": "uri",
      "pattern": "^https?://.+"
    },
    "maxOrderQuantity": {
      "type": "number",
      "description": "Max Order Quantity. Rules: Must be a number greater than or equal to 1.",
      "minimum": 1
    },
    "contactDetails": {
      "type": "string",
      "description": "Contact Details. Rules: Must be a valid email format.",
      "format": "email",
      "pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
    },
    "specifications": {
      "type": "array",
      "description": "Technical specifications. Rules: Each item must have a 'name', 'summary', and 'details'.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the specification or technology"
          },
          "summary": {
            "type": "string",
            "description": "A brief summary of the specification"
          },
          "details": {
            "type": "string",
            "description": "Detailed information about the specification"
          }
        },
        "required": ["name", "summary", "details"]
      }
    }
  },
  "oneOf": [
    {
      "properties": {
        "color": {
          "const": "Blue"
        },
        "storageCapacity": {
          "enum": ["512 GB", "1000 GB"]
        }
      }
    },
    {
      "properties": {
        "color": {
          "enum": ["Black", "Natural", "White"]
        },
        "storageCapacity": {
          "enum": ["128 GB", "256 GB", "512 GB", "1000 GB"]
        }
      }
    }
  ],
  "required": [
    "storageCapacity",
    "color",
    "memory",
    "displaySize",
    "imageResolution",
    "capacity",
    "itemNumber",
    "manufacturerNo",
    "releaseDate",
    "externalLinks",
    "maxOrderQuantity",
    "contactDetails",
    "specifications"
  ]
}
curl -L 
  --request POST 
  --url 'https://api.emporix.io/schema/{tenant}/references' 
  --header 'Authorization: Bearer YOUR_OAUTH2_TOKEN' 
  --header 'Content-Type: multipart/form-data' 
  --form 'file=[object Object]' 
  --form 'body=[object Object]'
{
  "file": {
    "externalValue": "https://res.cloudinary.com/saas-ag/raw/upload/schemata2/saastest2/653a30c0951b2b0665884f89_v1.json"
  },
  "body": {
    "name": {
      "en": "Product Custom Attributes"
    },
    "types": [
      "PRODUCT"
    ]
  }
}
{
    "productType": "BASIC",
    "published": true,
    "id": "mobile-15-pro-blue-1",
    "code": "mobile-15-pro-blue-1",
    "name": {
        "de": "Mobile Phone 15 Pro Blue",
        "ar": "Mobile Phone 15 Pro Blue",
        "en": "Mobile Phone 15 Pro Blue",
        "fr": "Mobile Phone 15 Pro Blue"
    },
    "description": {
        "de": "",
        "ar": "",
        "en": "Mobile 15 Pro. Titanium becomes Pro.\n\nThe Mobile 15 Pro. Forged from titanium, with the all-changing A17 Pro chip, a customizable action button and an even more versatile camera system.\n\nFORGED FROM TITANIUM - The Mobile 15 Pro has a durable and lightweight space-age titanium design with a textured matte glass back. It also has a Ceramic Shield front that can withstand more than any smartphone glass. And it'\''s protected from water and dust.\n\nADVANCED DISPLAY - The 6.1\" Super Retina XDR Display2 with ProMotion boosts the refresh rate to 120 Hz when you need extra graphics power. Dynamic Island brings notifications and live activity to the front. And with Always On Display, the lock screen always shows your most important info without you having to tap it.\n\nEVERYTHING CHANGING A17 PRO CHIP - A Pro GPU makes gaming an immersive experience, with detailed environments and realistic characters. The A17 Pro is incredibly efficient and helps ensure you have battery power for the whole day.\n\nPOWERFUL PRO CAMERA SYSTEM - Incredible framing flexibility as if you had 7 Pro lenses. Take super high-resolution photos with more colour and detail with the 48 MP main camera. And with the 3x telephoto camera in Mobile 15 Pro, you'\''ll get razor-sharp close-ups from further away.\n\nADJUSTABLE ACTION BUTTON - The Action Button takes you straight to your favourite feature. Just set it to silent mode, camera, voice memo, shortcut or any other feature. Then all you have to do is press and hold the Action Button to start it.\n\nPRO CONNECTIVITY - With the new USB C port, you can charge your Mac or iPad with the same cable as your Mobile 15 Pro. With USB 3, you get a huge leap in data transfer. And you can charge files up to 2x faster with Wi-Fi 6E.\n\nIMPORTANT SAFETY FEATURES - If you need to contact emergency services but have no network or Wi-Fi, you can use Emergency SOS via satellite. With Accident Detection, Mobile can detect a serious car accident and call for help if you can'\''t.\n\nMADE TO MAKE A DIFFERENCE - Mobile comes with privacy features that ensure you stay in control of your data. It'\''s made from more recycled materials to minimise its environmental impact. And it has built-in features that make Mobile more accessible to everyone.\n\nCOMES WITH APPLECARE WARRANTY - Every Mobile comes with a one-year manufacturer'\''s warranty and up to 90 days of free technical support. Get AppleCare+ or AppleCare+ with theft and loss to extend your protection.\n\nMobile 15, Mobile 15 Plus, Mobile 15 Pro and Mobile 15 Pro Max are protected from water and dust and have been tested under controlled laboratory conditions. They are rated IP68 to IEC standard 60529 (up to 6 metres for up to 30 minutes). Protection from water and dust is not permanent and may diminish over time as a result of normal wear and tear. Do not charge a wet Mobile. Cleaning and drying instructions are provided in the user manual. The warranty does not cover damage caused by liquids.",
        "fr": ""
    },
    "mixins": {
        "productCustomAttributes": {
            "inStock": true
        },
        "mixinsExampleAttributes": {
            "storageCapacity": "1000 GB",
            "color": "Blue",
            "memory": "8 GB",
            "displaySize": "6.10",
            "imageResolution": "2556 x 1179 pixels",
            "iOSOperatingSystem": true,
            "capacity": "3274 mAh",
            "itemNumber": 38606712,
            "manufacturerNo": "MTV13ZD/A",
            "releaseDate": "2023-09-22",
            "salesRank": {
                "rank": 2,
                "total": 4405
            },
            "externalLinks": "https://shop.eno.de/de/datasheets/product/view/sku/150728",
            "maxOrderQuantity": 3,
            "contactDetails": "[email protected]",
            "specifications": [
                {
                    "name": "5G (sub‑6 GHz and mmWave)",
                    "summary": "4x4 MIMO",
                    "details": "5G technology supporting sub‑6 GHz and mmWave frequencies with 4x4 MIMO10"
                },
                {
                    "name": "Gigabit LTE",
                    "summary": "4x4 MIMO and LAA",
                    "details": "High-speed LTE technology with 4x4 MIMO and LAA10"
                },
                {
                    "name": "Wi‑Fi 6E (802.11ax)",
                    "summary": "2x2 MIMO",
                    "details": "Wi-Fi 6E technology (802.11ax) supporting 2x2 MIMO11"
                },
                {
                    "name": "Bluetooth 5.3",
                    "summary": "Bluetooth technology",
                    "details": "Version 5.3 of the Bluetooth wireless communication standard"
                },
                {
                    "name": "NFC with reader mode",
                    "summary": "NFC technology",
                    "details": "Near Field Communication technology with reader mode"
                }
            ]
        }
    },
    "metadata": {
        "mixins": {
            "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/productCustomAttributesMixIn.v29.json",
            "mixinsExampleAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/powerzone/mixins/emporix_mixins_testing_jsonschema_v1.json"
        }
    }
}

To test the endpoint, open the API reference or check the example of a curl request.

To test the endpoint, open the API reference or check the example of a curl request.

To test the endpoint, open the API reference or check the example of a curl request.