# Models

## The AssignmentDeprecated object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"AssignmentDeprecated":{"type":"object","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when a resource is assigned to a category."},"ref":{"required":["id","type","url"],"type":"object","properties":{"id":{"type":"string","description":"Resource’s unique identifier generated when the resource is created."},"type":{"type":"string","description":"Type of assignment. When assigning products to categories, the value should be set to `product`."},"url":{"type":"string","description":"Resource URL generated when the resource is created."}},"description":"Reference to the resource."}},"description":"Assignment of a resource (such as a product) to a category."}}}}
```

## The OwnClassificationMixin object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"OwnClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin.","pattern":"^[a-zA-Z0-9_]\\S*$"},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."}},"required":["name","schemaUrl"],"description":"Classification mixin defined for a given category."}}}}
```

## The ClassificationMixin object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"ClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin","pattern":"^[a-zA-Z0-9_]\\S*$"},"mixinPath":{"type":"string","description":"The mixins path that should be used when defining attributes on a product. It's built based on the following pattern - `class_<sourceCategory.code>_<name>`."},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."},"sourceCategoryId":{"type":"string","description":"Unique identifier of the category from which the mixin comes from. Can be this category ID or one of the parent categories IDs."}},"required":["name","schemaUrl"],"description":"Classification mixin with source category information."}}}}
```

## The BulkAssignmentResponse object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"BulkAssignmentResponse":{"type":"array","items":{"type":"object","properties":{"assignmentId":{"type":"string","description":"ID of generated document."},"productId":{"type":"string","description":"ID of the product."},"index":{"type":"integer","description":"Index of the item in the array."},"code":{"type":"integer","description":"HTTP status' code."},"status":{"type":"string","description":"HTTP status."},"message":{"type":"string","description":"Error message which is present only when creation of the assignment failed."}}}}}}}
```

## The AssignmentIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"AssignmentIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of generated document."}}}}}}
```

## The BulkAssignmentRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"BulkAssignmentRequest":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","properties":{"ref":{"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Assignment reference unique identifier, for example product ID."},"type":{"minLength":1,"type":"string","enum":["PRODUCT"],"description":"Assignment reference type, for example 'product'."}},"required":["id","type"]}},"required":["ref"]}}}}}
```

## The BulkAssignmentUpsertRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"BulkAssignmentUpsertRequest":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","properties":{"ref":{"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Assignment reference unique identifier, for example product ID."}},"required":["id"]}},"required":["ref"]}}}}}
```

## The AssignmentRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"AssignmentRequest":{"required":["ref"],"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Reference","description":"Assignment reference."}}},"Reference":{"required":["id","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Assignment reference unique identifier, for example product ID."},"type":{"minLength":1,"type":"string","enum":["PRODUCT"],"description":"Assignment reference type, for example 'product'."}},"description":"Assignment reference."}}}}
```

## The Category object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"Category":{"type":"object","description":"Definition of category","properties":{"id":{"type":"string","description":"Category unique identifier generated when the category is created."},"parentId":{"type":"string","description":"Unique identifier of the parent category. No parentId in the body indicates that this is a root category.","nullable":true},"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name as a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description as a map of translations."},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"name":{"type":"string","description":"Category name in tenant default language.","deprecated":true},"description":{"type":"string","description":"Description in tenant default language.","deprecated":true},"code":{"type":"string","description":"Unique category identifier defined by the tenant."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for each category.","items":{"type":"string"}},"validity":{"$ref":"#/components/schemas/Validity","description":"Category validity."},"position":{"type":"integer","format":"int32","description":"Category position relative to sibling categories."},"published":{"type":"boolean","description":"Flag indicating whether the category has been published."},"supercategoriesIds":{"type":"array","description":"IDs of supercategories.","items":{"type":"string"}},"ownClassificationMixins":{"type":"array","description":"List of classification mixins defined for this category.","items":{"$ref":"#/components/schemas/OwnClassificationMixin"}},"classificationMixins":{"type":"array","description":"Combined list of classification mixins from parent categories and category's ownClassification mixins.","items":{"$ref":"#/components/schemas/ClassificationMixin"}},"mixins":{"type":"object","description":"Custom category attributes included directly in the mixins object."},"metadata":{"$ref":"#/components/schemas/MetadataResponse"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}}},"required":["id","localizedName","position","published","metadata","media"]},"Validity":{"type":"object","properties":{"from":{"type":"string","description":"Date and time from which the category is valid compliant with the ISO 8601 standard.","format":"date-time"},"to":{"type":"string","description":"Date and time to which the category is valid compliant with the ISO 8601 standard.","format":"date-time"}}},"OwnClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin.","pattern":"^[a-zA-Z0-9_]\\S*$"},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."}},"required":["name","schemaUrl"],"description":"Classification mixin defined for a given category."},"ClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin","pattern":"^[a-zA-Z0-9_]\\S*$"},"mixinPath":{"type":"string","description":"The mixins path that should be used when defining attributes on a product. It's built based on the following pattern - `class_<sourceCategory.code>_<name>`."},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."},"sourceCategoryId":{"type":"string","description":"Unique identifier of the category from which the mixin comes from. Can be this category ID or one of the parent categories IDs."}},"required":["name","schemaUrl"],"description":"Classification mixin with source category information."},"MetadataResponse":{"allOf":[{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the category was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the category was last modified compliant with the ISO 8601 standard.","format":"date-time"}}},{"$ref":"#/components/schemas/MetadataUpdate"}]},"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}},"Media":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media."},"url":{"type":"string","description":"Url of the file."},"contentType":{"type":"string","description":"Content type of the file."},"metadata":{"allOf":[{"$ref":"#/components/schemas/MediaMetadataQueryDocument"},{"description":"Metadata of the file."}]},"customAttributes":{"allOf":[{"$ref":"#/components/schemas/MediaCustomAttributesQueryDocument"},{"description":"Custom attributes of the file."}]}}},"MediaMetadataQueryDocument":{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the media was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the media was modified compliant with the ISO 8601 standard.","format":"date-time"}},"description":"Metadata of the file."},"MediaCustomAttributesQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media's custom attributes."},"height":{"type":"integer","description":"Height of the media image.","format":"int32"},"width":{"type":"integer","description":"Width of the media image.","format":"int32"},"sizeKB":{"type":"number","description":"Size in kilobytes of the file.","format":"double"},"type":{"type":"string","description":"Mime type of the file."},"name":{"type":"string","description":"Name of the file."}},"description":"Custom attributes of the file."}}}}
```

## The CategoryList object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryList":{"type":"array","description":"A list of categories.","items":{"$ref":"#/components/schemas/Category"}},"Category":{"type":"object","description":"Definition of category","properties":{"id":{"type":"string","description":"Category unique identifier generated when the category is created."},"parentId":{"type":"string","description":"Unique identifier of the parent category. No parentId in the body indicates that this is a root category.","nullable":true},"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name as a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description as a map of translations."},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"name":{"type":"string","description":"Category name in tenant default language.","deprecated":true},"description":{"type":"string","description":"Description in tenant default language.","deprecated":true},"code":{"type":"string","description":"Unique category identifier defined by the tenant."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for each category.","items":{"type":"string"}},"validity":{"$ref":"#/components/schemas/Validity","description":"Category validity."},"position":{"type":"integer","format":"int32","description":"Category position relative to sibling categories."},"published":{"type":"boolean","description":"Flag indicating whether the category has been published."},"supercategoriesIds":{"type":"array","description":"IDs of supercategories.","items":{"type":"string"}},"ownClassificationMixins":{"type":"array","description":"List of classification mixins defined for this category.","items":{"$ref":"#/components/schemas/OwnClassificationMixin"}},"classificationMixins":{"type":"array","description":"Combined list of classification mixins from parent categories and category's ownClassification mixins.","items":{"$ref":"#/components/schemas/ClassificationMixin"}},"mixins":{"type":"object","description":"Custom category attributes included directly in the mixins object."},"metadata":{"$ref":"#/components/schemas/MetadataResponse"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}}},"required":["id","localizedName","position","published","metadata","media"]},"Validity":{"type":"object","properties":{"from":{"type":"string","description":"Date and time from which the category is valid compliant with the ISO 8601 standard.","format":"date-time"},"to":{"type":"string","description":"Date and time to which the category is valid compliant with the ISO 8601 standard.","format":"date-time"}}},"OwnClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin.","pattern":"^[a-zA-Z0-9_]\\S*$"},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."}},"required":["name","schemaUrl"],"description":"Classification mixin defined for a given category."},"ClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin","pattern":"^[a-zA-Z0-9_]\\S*$"},"mixinPath":{"type":"string","description":"The mixins path that should be used when defining attributes on a product. It's built based on the following pattern - `class_<sourceCategory.code>_<name>`."},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."},"sourceCategoryId":{"type":"string","description":"Unique identifier of the category from which the mixin comes from. Can be this category ID or one of the parent categories IDs."}},"required":["name","schemaUrl"],"description":"Classification mixin with source category information."},"MetadataResponse":{"allOf":[{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the category was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the category was last modified compliant with the ISO 8601 standard.","format":"date-time"}}},{"$ref":"#/components/schemas/MetadataUpdate"}]},"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}},"Media":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media."},"url":{"type":"string","description":"Url of the file."},"contentType":{"type":"string","description":"Content type of the file."},"metadata":{"allOf":[{"$ref":"#/components/schemas/MediaMetadataQueryDocument"},{"description":"Metadata of the file."}]},"customAttributes":{"allOf":[{"$ref":"#/components/schemas/MediaCustomAttributesQueryDocument"},{"description":"Custom attributes of the file."}]}}},"MediaMetadataQueryDocument":{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the media was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the media was modified compliant with the ISO 8601 standard.","format":"date-time"}},"description":"Metadata of the file."},"MediaCustomAttributesQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media's custom attributes."},"height":{"type":"integer","description":"Height of the media image.","format":"int32"},"width":{"type":"integer","description":"Width of the media image.","format":"int32"},"sizeKB":{"type":"number","description":"Size in kilobytes of the file.","format":"double"},"type":{"type":"string","description":"Mime type of the file."},"name":{"type":"string","description":"Name of the file."}},"description":"Custom attributes of the file."}}}}
```

## The CategoryAssignment object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryAssignment":{"type":"object","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when the assignment is created."},"categoryId":{"type":"string","description":"Assignment category identifier."},"ref":{"allOf":[{"$ref":"#/components/schemas/CategoryAssignmentRefQueryDocument"},{"description":"Localized category description in a form of a map of translations."}]}},"description":"Definition od category assignment"},"CategoryAssignmentRefQueryDocument":{"required":["id","localizedName","type"],"type":"object","properties":{"id":{"type":"string","description":"Assignment reference unique identifier, for example product ID."},"type":{"type":"string","enum":["PRODUCT"],"description":"Assignment reference type, for example 'product'."},"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Assignment reference localized name."}},"description":"Localized category description in a form of a map of translations."}}}}
```

## The CategoryAssignmentRefQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryAssignmentRefQueryDocument":{"required":["id","localizedName","type"],"type":"object","properties":{"id":{"type":"string","description":"Assignment reference unique identifier, for example product ID."},"type":{"type":"string","enum":["PRODUCT"],"description":"Assignment reference type, for example 'product'."},"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Assignment reference localized name."}},"description":"Localized category description in a form of a map of translations."}}}}
```

## The CategoryCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryCreateRequest":{"required":["localizedName","published"],"type":"object","properties":{"id":{"type":"string","description":"Custom category identifier. If not provided, it is automatically generated"},"type":{"type":"string","enum":["CLASSIFICATION","STANDARD"],"description":"Category type, by default it is `STANDARD`."},"localizedName":{"minItems":1,"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name in a form of a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description in a form of a map of translations."},"parentId":{"type":"string","description":"Unique identifier of the parent category. No parentId in the body indicates that this is a root category.","nullable":true},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for every category.","nullable":true,"items":{"type":"string"}},"code":{"type":"string","description":"Unique category identifier, defined by the tenant. Required for category of type `CLASSIFICATION`.","nullable":true},"validity":{"type":"object","additionalProperties":{"type":"string","format":"date-time"},"description":"Category validity."},"position":{"minimum":0,"type":"integer","description":"Category position, set in relation to the categories on the same level (sharing the same parent) in the tree.","format":"int32","nullable":true},"published":{"type":"boolean","description":"Flag indicating whether the category has been published or not."},"ownClassificationMixins":{"type":"array","description":"List of classification mixins defined by this category.","items":{"$ref":"#/components/schemas/OwnClassificationMixin"}},"mixins":{"type":"object","additionalProperties":true,"description":"Custom category attributes that need to be included directly in the mixins object."},"metadata":{"$ref":"#/components/schemas/MetadataCreate"}}},"OwnClassificationMixin":{"type":"object","properties":{"name":{"type":"string","description":"Name of the mixin.","pattern":"^[a-zA-Z0-9_]\\S*$"},"schemaUrl":{"type":"string","description":"URL of the mixin schema.","pattern":"^https?://[^\\s/$.?#].\\S*$"},"required":{"type":"boolean","description":"Indicates whether the mixin is required."}},"required":["name","schemaUrl"],"description":"Classification mixin defined for a given category."},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The CategoryDeprecated object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryDeprecated":{"title":"","type":"object","properties":{"id":{"type":"string","description":"Category unique identifier generated when the category is created."},"parentId":{"type":"string","description":"Unique identifier of the parent category."},"name":{"description":"Category name.","oneOf":[{"type":"string","description":"Category name in the default language."},{"type":"object","description":"Map of translations.\nThe keys should be ISO language codes.\nThe values should be category names in specified languages."}]},"code":{"type":"string","description":"Unique category identifier, defined by the user."},"description":{"description":"Category description.","oneOf":[{"type":"string","description":"Category description in the default language."},{"type":"object","description":"Map of translations.\nThe keys should be ISO language codes.\nThe values should be category descriptions in specified languages."}]},"media":{"type":"array","description":"Media files attached to the category.","items":{"type":"object","properties":{"id":{"type":"string","description":"Media file's unique identifier generated when the media file is created."},"url":{"type":"string","description":"Media file's URL."},"tags":{"type":"array","description":"List of media file tags.","items":{"type":"string"}},"contentType":{"type":"string","description":"Media file's MIME type."},"stored":{"type":"boolean","description":"Flag indicating whether the media file is stored in the Category Service."},"uploadLink":{"type":"string","description":"URL where the media file is uploaded, with the file extension specified."}},"additionalProperties":false}},"position":{"minimum":0,"type":"integer","description":"Position in the category tree (on the same category level)."},"published":{"type":"boolean","description":"Flag indicating whether the category has been published or not."},"ecn":{"type":"array","description":"List of external category numbers (ECNs). ","items":{"type":"string"}},"subcategories":{"type":"array","description":"List of direct subcategories.","items":{"$ref":"#/components/schemas/CategoryDeprecated"}},"assignments":{"type":"array","description":"List of resources assigned to the category.","items":{"$ref":"#/components/schemas/AssignmentDeprecated"}}},"description":""},"AssignmentDeprecated":{"type":"object","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when a resource is assigned to a category."},"ref":{"required":["id","type","url"],"type":"object","properties":{"id":{"type":"string","description":"Resource’s unique identifier generated when the resource is created."},"type":{"type":"string","description":"Type of assignment. When assigning products to categories, the value should be set to `product`."},"url":{"type":"string","description":"Resource URL generated when the resource is created."}},"description":"Reference to the resource."}},"description":"Assignment of a resource (such as a product) to a category."}}}}
```

## The CategoryIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of generated document."}}}}}}
```

## The CategoryPartialUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryPartialUpdateRequest":{"required":["metadata"],"type":"object","properties":{"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name in a form of a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description in a form of a map of translations."},"parentId":{"type":"string","description":"Unique identifier of the parent category. No parentId in the body indicates that this is a root category.","nullable":true},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for every category.","nullable":true,"items":{"type":"string"}},"code":{"type":"string","description":"Unique category identifier, defined by the tenant.","nullable":true},"validity":{"type":"object","additionalProperties":{"type":"string","format":"date-time"},"description":"Category validity."},"position":{"type":"integer","description":"Category position, set in relation to the categories on the same level (sharing the same parent) in the tree.","format":"int32","nullable":true},"published":{"type":"boolean","description":"Flag indicating whether the category has been published or not.","nullable":true},"mixins":{"type":"object","additionalProperties":true,"description":"Custom category attributes that need to be included directly in the mixins object."},"metadata":{"$ref":"#/components/schemas/MetadataUpdate"}}},"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The CategoryTree object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryTree":{"type":"object","description":"Definition of category tree","required":["id","localizedName","name","position","published"],"properties":{"id":{"type":"string","description":"Category unique identifier generated when the category is created."},"name":{"type":"string","description":"Category name in tenant default language.","deprecated":true},"description":{"type":"string","description":"Description in tenant default language.","deprecated":true},"code":{"type":"string","description":"Unique category identifier defined by the tenant.","deprecated":true},"localizedName":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name as a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description as a map of translations."},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"validity":{"$ref":"#/components/schemas/Validity","description":"Category validity."},"position":{"type":"integer","format":"int32","description":"Category position in relation to sibling categories."},"published":{"type":"boolean","description":"Flag indicating whether the category has been published."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for each category.","items":{"type":"string"}},"subcategories":{"type":"array","description":"Subcategories of this category.","items":{"$ref":"#/components/schemas/CategoryTree"}}}},"Validity":{"type":"object","properties":{"from":{"type":"string","description":"Date and time from which the category is valid compliant with the ISO 8601 standard.","format":"date-time"},"to":{"type":"string","description":"Date and time to which the category is valid compliant with the ISO 8601 standard.","format":"date-time"}}}}}}
```

## The CategoryUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryUpdateRequest":{"required":["localizedName","published"],"type":"object","properties":{"localizedName":{"minItems":1,"type":"object","additionalProperties":{"type":"string"},"description":"Localized category name in a form of a map of translations."},"localizedDescription":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized category description in a form of a map of translations."},"parentId":{"type":"string","description":"Unique identifier of the parent category. No parentId in the body indicates that this is a root category.","nullable":true},"localizedSlug":{"type":"object","additionalProperties":{"type":"string"},"description":"Provides localized category name or code without diacritics for the URL."},"ecn":{"type":"array","description":"List of external category numbers (ECNs) unique for every category.","nullable":true,"items":{"type":"string"}},"code":{"type":"string","description":"Unique category identifier, defined by the tenant. Required for category of type `CLASSIFICATION`.","nullable":true},"validity":{"type":"object","additionalProperties":{"type":"string","format":"date-time"},"description":"Category validity."},"position":{"minimum":0,"type":"integer","description":"Category position, set in relation to the categories on the same level (sharing the same parent) in the tree.","format":"int32","nullable":true},"published":{"type":"boolean","description":"Flag indicating whether the category has been published or not."},"mixins":{"type":"object","additionalProperties":true,"description":"Custom category attributes that need to be included directly in the mixins object."},"metadata":{"$ref":"#/components/schemas/MetadataUpdate"}}},"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The ErrorMessage object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"ErrorMessage":{"title":"error","type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"Original HTTP error code. It should be consistent with the HTTP response code."},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"Classification of the error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `validation_failure`."},"message":{"type":"string","description":"Descriptive error message for debugging purposes."},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."},"details":{"type":"array","description":"List of problems causing the error.","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"Element in request data which is causing the error, for example `category.name`.\n\nIf the violation was not field-specific, this field will be empty."},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"Classification of the specific error cause. This value should always be interpreted within the context of the general error type.\n\n**Note:** The error type should be written in lowercase and include underscores, for example `missing_value`."},"message":{"type":"string","description":"Descriptive error message for debugging purposes."},"moreInfo":{"type":"string","description":"More information (such as a link to the documentation) for investigating further and getting support."}},"description":"Specific error cause."}}},"description":"Schema for API-specific errors."}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"ErrorResponse":{"required":["code","details","message","status"],"type":"object","properties":{"resourceId":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}}
```

## The Media object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"Media":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media."},"url":{"type":"string","description":"Url of the file."},"contentType":{"type":"string","description":"Content type of the file."},"metadata":{"allOf":[{"$ref":"#/components/schemas/MediaMetadataQueryDocument"},{"description":"Metadata of the file."}]},"customAttributes":{"allOf":[{"$ref":"#/components/schemas/MediaCustomAttributesQueryDocument"},{"description":"Custom attributes of the file."}]}}},"MediaMetadataQueryDocument":{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the media was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the media was modified compliant with the ISO 8601 standard.","format":"date-time"}},"description":"Metadata of the file."},"MediaCustomAttributesQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media's custom attributes."},"height":{"type":"integer","description":"Height of the media image.","format":"int32"},"width":{"type":"integer","description":"Width of the media image.","format":"int32"},"sizeKB":{"type":"number","description":"Size in kilobytes of the file.","format":"double"},"type":{"type":"string","description":"Mime type of the file."},"name":{"type":"string","description":"Name of the file."}},"description":"Custom attributes of the file."}}}}
```

## The MediaCustomAttributesQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"MediaCustomAttributesQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of media's custom attributes."},"height":{"type":"integer","description":"Height of the media image.","format":"int32"},"width":{"type":"integer","description":"Width of the media image.","format":"int32"},"sizeKB":{"type":"number","description":"Size in kilobytes of the file.","format":"double"},"type":{"type":"string","description":"Mime type of the file."},"name":{"type":"string","description":"Name of the file."}},"description":"Custom attributes of the file."}}}}
```

## The MediaMetadataQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"MediaMetadataQueryDocument":{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the media was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the media was modified compliant with the ISO 8601 standard.","format":"date-time"}},"description":"Metadata of the file."}}}}
```

## The MetadataCreate object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The MetadataUpdate object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The MetadataResponse object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"MetadataResponse":{"allOf":[{"type":"object","properties":{"createdAt":{"type":"string","description":"Timestamp indicating when the category was created compliant with the ISO 8601 standard.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the category was last modified compliant with the ISO 8601 standard.","format":"date-time"}}},{"$ref":"#/components/schemas/MetadataUpdate"}]},"MetadataUpdate":{"allOf":[{"type":"object","properties":{"version":{"type":"integer","description":"Category version.","format":"int32"}}},{"$ref":"#/components/schemas/MetadataCreate"}]},"MetadataCreate":{"type":"object","properties":{"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"A key-value map, where key is a mixin name and value is a link to the mixin schema."}}}}}}
```

## The Object object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"Object":{"type":"object"}}}}
```

## The SearchRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"SearchRequest":{"type":"object","properties":{"q":{"type":"string","description":"A standard query parameter is used to search for specific values. \n\nSee: [Standard practises - Query parameter](https://developer.emporix.io/api-references/standard-practices/q-param)\n"}}}}}}
```

## The CategoryTreeSearchRequest object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"CategoryTreeSearchRequest":{"required":["categoryIds"],"type":"object","properties":{"categoryIds":{"type":"array","items":{"type":"string"},"description":"List of category IDs. If provided, the response returns only the category trees that include at least one of the specified categories."}}}}}}
```

## The Reference object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"Reference":{"required":["id","type"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"Assignment reference unique identifier, for example product ID."},"type":{"minLength":1,"type":"string","enum":["PRODUCT"],"description":"Assignment reference type, for example 'product'."}},"description":"Assignment reference."}}}}
```

## The Validity object

```json
{"openapi":"3.0.1","info":{"title":"Category","version":"0.0.1"},"components":{"schemas":{"Validity":{"type":"object","properties":{"from":{"type":"string","description":"Date and time from which the category is valid compliant with the ISO 8601 standard.","format":"date-time"},"to":{"type":"string","description":"Date and time to which the category is valid compliant with the ISO 8601 standard.","format":"date-time"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-6/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
