For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Instance

Retrieving all custom instances

get

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

Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.

In cursor mode:

  • next and prev cannot be used together and return 400.

  • pageNumber is ignored.

  • the X-Total-Count request header is ignored and the X-Total-Count response header is not returned.

If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.

Required scopes
This endpoint requires the following scopes:
  • : Read custom instances of any custom schema type.
  • : Read custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read`.
  • : Allows to read only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read_own`.
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 the 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=mixins.mixinName:exists, where the specific mixin named mixinName exists in the database.
  • 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
nextstring · max: 4096Optional

Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results. Cannot be combined with prev in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).

prevstring · max: 4096Optional

Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.

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
get/schema/{tenant}/custom-entities/{type}/instances
GET /schema/{tenant}/custom-entities/{type}/instances HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "type": "CUSTOM_DOCUMENT",
    "owner": {
      "type": "EMPLOYEE",
      "userId": "00u4ukqvzlEP31sCk417"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "populatirty": 1
      }
    },
    "media": [
      "media_id_1",
      "media_id_2"
    ],
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/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",
    "owner": {
      "type": "CUSTOMER",
      "userId": "79474954",
      "legalEntityId": "0149b1314144a01491314z128"
    },
    "media": [
      "media_id_3"
    ],
    "metadata": {
      "createdAt": "2025-04-17T13:00:00.000Z",
      "modifiedAt": "2025-04-17T13:00:00.000Z",
      "version": 1
    }
  }
]

Creating a custom instance

post

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

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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
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

Id of the created schema.

idstringOptional

ID of the generated document.

post/schema/{tenant}/custom-entities/{type}/instances
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: 253

{
  "id": "123",
  "name": {
    "en": "Report"
  },
  "mixins": {
    "productCustomAttributes": {
      "inStock": true,
      "popularity": 1
    }
  },
  "metadata": {
    "mixins": {
      "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json"
    }
  }
}
{
  "id": "123"
}

Retrieving a custom instance

get

Retrieves a single custom instance by id.

Required scopes
This endpoint requires the following scopes:
  • : Read custom instances of any custom schema type.
  • : Read custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read`.
  • : Allows to read only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read_own`.
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 the 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
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
idstringOptional

Unique identifier of the custom instance.

nameobjectOptional

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

typestringOptional

Custom schema type to which custom instance is related.

mixinsstringOptional

A key-value map of additional attributes.

mediastring[]Optional

List of media IDs assigned to the custom instance.

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

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
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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
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

Id of the created schema.

idstringOptional

ID of the generated document.

put/schema/{tenant}/custom-entities/{type}/instances/{id}
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: 255

{
  "name": {
    "en": "Report"
  },
  "mixins": {
    "productCustomAttributes": {
      "inStock": false,
      "popularity": 2
    }
  },
  "metadata": {
    "mixins": {
      "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json"
    },
    "version": 1
  }
}
{
  "id": "123"
}

Deleting a custom instance

delete

Deletes a custom instance.

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the custom instance is associated.

Example: CUSTOM_DOCUMENT
idstringRequired

Unique identifier of the entity.

Responses
204

No content

No content

delete/schema/{tenant}/custom-entities/{type}/instances/{id}
DELETE /schema/{tenant}/custom-entities/{type}/instances/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Patching a custom instance

patch

Partially updates a custom instance. The patch request consists of a set of operations that should be defined according to the RFC-6902 standard.

To append a row to an array mixin field, use add with a path ending in /-. See the Append to an array mixin field example.

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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
Content-LanguagestringOptional

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

Example: de
Bodyobject · PatchOperation[]
opstring · enumRequired

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

Possible values:
pathstringRequired

Path to the field to update.

Examples: /name, /mixins/additionalAttributes/externalId, /mixins/additionalAttributes/careInstructions/1.

To append an item to an array mixin field (for example, a table row), use add with a path ending in /-. The - means append after the last element.

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

No content

patch/schema/{tenant}/custom-entities/{type}/instances/{id}
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"
    }
  }
]

No content

Searching for custom instances

post

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

Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.

In cursor mode:

  • next and prev cannot be used together and return 400.

  • pageNumber is ignored.

  • the X-Total-Count request header is ignored and the X-Total-Count response header is not returned.

If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.

Required scopes
This endpoint requires the following scopes:
  • : Read custom instances of any custom schema type.
  • : Read custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read`.
  • : Allows to read only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read_own`.
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 the 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
nextstring · max: 4096Optional

Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results. Cannot be combined with prev in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).

prevstring · max: 4096Optional

Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.

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
post/schema/{tenant}/custom-entities/{type}/instances/search
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",
    "owner": {
      "type": "EMPLOYEE",
      "userId": "00u4ukqvzlEP31sCk417"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "populatirty": 1
      }
    },
    "media": [
      "media_id_1",
      "media_id_2"
    ],
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json"
      },
      "createdAt": "2025-04-17T13:00:00.000Z",
      "modifiedAt": "2025-05-14T13:00:00.000Z",
      "version": 3
    }
  }
]

Creating custom instances in bulk

post

Creates multiple custom instances. The maximum batch size is 200.

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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 · CustomInstanceCreation[]
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
indexintegerOptional

Index of the processed item, matching the item position in request body.

codeintegerOptional

HTTP Status Code.

statusstringOptional

HTTP Status description

messagestringOptional

Error message.

post/schema/{tenant}/custom-entities/{type}/instances/bulk
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: 291

[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "popularity": 1
      }
    },
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/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'"
  }
]

Upserting custom instances in bulk

put

Upserts multiple custom instances. The maximum batch size is 200.

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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[]
idstringRequired

Custom instance id

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
indexintegerOptional

Index of the processed item, matching the item position in request body.

codeintegerOptional

HTTP Status Code.

statusstringOptional

HTTP Status description

messagestringOptional

Error message.

put/schema/{tenant}/custom-entities/{type}/instances/bulk
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: 291

[
  {
    "id": "123",
    "name": {
      "en": "Report"
    },
    "mixins": {
      "productCustomAttributes": {
        "inStock": true,
        "popularity": 1
      }
    },
    "metadata": {
      "mixins": {
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn-v38.json"
      }
    }
  },
  {
    "id": "456",
    "name": {
      "en": "Manual"
    }
  }
]
[
  {
    "index": 0,
    "code": 201,
    "status": "Created"
  },
  {
    "index": 1,
    "code": 204,
    "status": "No Content"
  }
]

Deleting custom instances in bulk

delete

Removes multiple custom instances.

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

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

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the custom instance is associated.

Example: CUSTOM_DOCUMENT
Responses
207

Bulk operation was successful

application/json
indexintegerOptional

Index of the processed item, matching the item position in request body.

codeintegerOptional

HTTP Status Code.

statusstringOptional

HTTP Status description

messagestringOptional

Error message.

delete/schema/{tenant}/custom-entities/{type}/instances/bulk
DELETE /schema/{tenant}/custom-entities/{type}/instances/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "index": 0,
    "code": 204,
    "status": "No Content"
  },
  {
    "index": 1,
    "code": 204,
    "status": "No Content"
  }
]

Patching custom instances in bulk

patch

Partially updates multiple custom instances in a single request. Each item must contain the custom instance id and a list of patch operations.

The maximum batch size is 200.

Required scopes
This endpoint requires the following scopes:
  • : Manage custom instances of any custom schema type.
  • : Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.
  • : Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.
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 the 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
Bodyobject · BulkPatchCustomInstanceRequest[]
idstringRequired

Unique identifier of the custom instance to patch.

Responses
207

Bulk patch was processed. Each item contains its own result status.

application/json
indexintegerOptional

Index of the processed item, matching the item position in request body.

codeintegerOptional

HTTP Status Code.

statusstringOptional

HTTP Status description

messagestringOptional

Error message.

patch/schema/{tenant}/custom-entities/{type}/instances/bulk
PATCH /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: 204

[
  {
    "id": "Ford",
    "data": [
      {
        "op": "REPLACE",
        "path": "/name/en",
        "value": "Ford bulk patched"
      }
    ]
  },
  {
    "id": "Aston_Martin",
    "data": [
      {
        "op": "REPLACE",
        "path": "/mixins/productCustomAttributes/minOrderQuantity",
        "value": 10
      }
    ]
  }
]
[
  {
    "index": 0,
    "id": "Ford",
    "code": 204,
    "status": "No Content"
  },
  {
    "index": 1,
    "code": 404,
    "status": "Not Found"
  }
]

Last updated

Was this helpful?