# Catalog management

Retrieve lists of catalogs and manage catalog details.

## Retrieving the filtered and sorted list of catalogs

> Get the filtered list of catalogs for the specified tenant. Also, sorting and paging options are available.\
> If none are given, default values are used.<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"Catalog":{"required":["id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"Catalog's unique identifier, generated when the catalog is created."},"name":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Name of the catalog. Depending on the use of the Accept-Language header, it can be either a String or a Map<Locale, String>"}]},"description":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Description of the catalog must be a string if the Accept-Language header is specified on the request or a map of translations if the header is missing."}]},"status":{"allOf":[{"$ref":"#/components/schemas/Status"},{"description":"Visibility status of the catalog, computed at this moment."}]},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}}},"description":"Definition of a catalog"},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"Status":{"type":"string","description":"Visibility status of the catalog in this moment. This value is based on configured visibility properties, and is computed for the moment the request is handled. It answers the question 'Is the catalog visible now?'","enum":["not_visible","visible"]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"Metadata":{"type":"object","properties":{"version":{"type":"integer","description":"Catalog version","format":"int32"},"updatedAt":{"type":"string","description":"Timestamp indicating when the catalog was last modified compliant with the ISO 8601 standard.","format":"date-time"},"createdAt":{"type":"string","description":"Timestamp indicating when the catalog was created compliant with the ISO 8601 standard.","format":"date-time"}}},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}}},"paths":{"/catalog/{tenant}/catalogs":{"get":{"tags":["Catalog management"],"summary":"Retrieving the filtered and sorted list of catalogs","description":"Get the filtered list of catalogs for the specified tenant. Also, sorting and paging options are available.\nIf none are given, default values are used.\n","operationId":"GET-catalog-list-catalogs","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Search by the name of the catalog.\nIf you want to search for the name in a specific locale, you can just append the `.<locale>`, for example use `name.de`.\n","schema":{"type":"string"}},{"name":"description","in":"query","description":"Search by description of the catalog.\nIf you want to search for the name in a specific locale, you can just append the `.<locale>`, for example use `description.de`.\n","schema":{"type":"string"}},{"name":"publishedSite","in":"query","description":"Search by a site name. The `equal` operator is used here, therefore the site name must match.\n","schema":{"type":"string"}},{"name":"visibilityFrom","in":"query","description":"Search by start date of the visibility of the catalog. It must follow the pattern yyyy-MM-dd.\n","schema":{"type":"string","format":"date"}},{"name":"visibilityTo","in":"query","description":"Search by end date of the visibility of the catalog. It must follow the pattern yyyy-MM-dd.\n","schema":{"type":"string","format":"date"}},{"name":"metadataUpdatedAt","in":"query","description":"Search by last update date of the catalog. It must follow the pattern yyyy-MM-dd.\n","schema":{"type":"string","format":"date"}},{"name":"pageNumber","in":"query","description":"Page number to be retrieved. The number of the first page is 1.\n**Note**: If the `pageNumber` parameter is passed, size of the pages must be specified in the `pageSize` parameter.\n","schema":{"minimum":1,"type":"integer","format":"int32","default":1}},{"name":"pageSize","in":"query","description":"Number of catalogs to be retrieved per page.\n","schema":{"minimum":1,"type":"integer","format":"int32","default":60}},{"name":"sort","in":"query","description":"Fields to sort the response data by following order of the parameters from left to right.\nCan contain multiple fields in format: `field name`:`sort direction` separated by a comma.\nThe colon with `sort direction` parameter is redundant and descending order is taken only\nif it is equal to `desc` or `DESC`.\nAscending order is considered in any other case.\nSorting by `name` parameter works properly only if the `Accept-Language` header is set to\na specific language or is empty with default language specified in the configuration service.\n","schema":{"type":"string"}},{"name":"X-Total-Count","in":"header","description":"This flag specifies if the API client should receive a X-Total-Count header with the total number of elements that match the search filter.\n","schema":{"type":"boolean","default":false}},{"name":"Accept-Language","in":"header","description":"List of properties used to sort the results, separated by commas.\nPossible values:\n* `*` - each internationalized field is returned as a map containing all available translations\n* `en`, `en,de` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. First language is the one with highest priority.\n* `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not available exception is thrown. This list must contains any possible extension for internationalized fields included in sort param.\n","schema":{"type":"string","default":"*"}}],"responses":{"200":{"description":"The search was successful.","headers":{"X-Total-Count":{"description":"Total amount of catalogs for given criteria.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Catalog"}}}}},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Creating a catalog

> Creates a new catalog based on the provided request payload, for the specified tenant.\
> \*\*\*\
> \
> \### Required scopes\
> \
> \`catalog.catalog\_manage\`<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"CreateCatalog":{"required":["name"],"type":"object","properties":{"id":{"type":"string","description":"Custom catalog identifier. If not provided, it is automatically generated.","minLength":1,"maxLength":66,"pattern":"^[a-zA-Z0-9_-]$"},"name":{"$ref":"#/components/schemas/Object","description":"Name of the catalog. Must be provided as a map of language codes to translations."},"description":{"$ref":"#/components/schemas/Object","description":"Description of the catalog. Must be provided as a map of language codes to translations."},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}}},"description":"Payload for creating a new catalog"},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"CreateCatalogResponse":{"required":["id"],"type":"object","properties":{"id":{"type":"string"}},"description":"Response for create catalog requests"},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}}},"paths":{"/catalog/{tenant}/catalogs":{"post":{"tags":["Catalog management"],"summary":"Creating a catalog","description":"Creates a new catalog based on the provided request payload, for the specified tenant.\n***\n\n### Required scopes\n\n`catalog.catalog_manage`\n","operationId":"POST-catalog-create-catalog","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"Content-Language","in":"header","description":"The Content-Language request HTTP header defines language(s) that can be used in the payload. Request body may contain only translations that are matching the languages specified in the header. Possible values:\n* `*` - request body may contain translations for all languages specified in tenant configuration. This is also the default behaviour if the header is not set.\n* `en`, `en,de`, `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5` - request body may contain only translations for languages specified in the header (if they are available in tenant configuration).\n\n**Note**: For catalog requests, localized fields (such as `name`, `description`) must always be provided as maps of language codes to values, regardless of the Content-Language header value.\n","schema":{"type":"string","default":"*"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCatalog"}}},"required":true},"responses":{"201":{"description":"The catalog has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCatalogResponse"}}}},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied due to insufficient rights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Given resource already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Retrieving all catalogs for category

> Get all catalogs with the specified category that belong to the tenant.<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"Catalog":{"required":["id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"Catalog's unique identifier, generated when the catalog is created."},"name":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Name of the catalog. Depending on the use of the Accept-Language header, it can be either a String or a Map<Locale, String>"}]},"description":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Description of the catalog must be a string if the Accept-Language header is specified on the request or a map of translations if the header is missing."}]},"status":{"allOf":[{"$ref":"#/components/schemas/Status"},{"description":"Visibility status of the catalog, computed at this moment."}]},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}}},"description":"Definition of a catalog"},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"Status":{"type":"string","description":"Visibility status of the catalog in this moment. This value is based on configured visibility properties, and is computed for the moment the request is handled. It answers the question 'Is the catalog visible now?'","enum":["not_visible","visible"]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"Metadata":{"type":"object","properties":{"version":{"type":"integer","description":"Catalog version","format":"int32"},"updatedAt":{"type":"string","description":"Timestamp indicating when the catalog was last modified compliant with the ISO 8601 standard.","format":"date-time"},"createdAt":{"type":"string","description":"Timestamp indicating when the catalog was created compliant with the ISO 8601 standard.","format":"date-time"}}},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}}},"paths":{"/catalog/{tenant}/catalogs/categories/{categoryId}":{"get":{"tags":["Catalog management"],"summary":"Retrieving all catalogs for category","description":"Get all catalogs with the specified category that belong to the tenant.\n","operationId":"GET-catalog-list-catalogs-for-category","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"categoryId","in":"path","description":"The unique id of the category, that will be matched with the category identifiers stored on catalogs.\n","required":true,"deprecated":false,"allowEmptyValue":false,"allowReserved":false,"schema":{"type":"string"}},{"name":"pageNumber","in":"query","description":"Page number to be retrieved. The number of the first page is 1.\n**Note**: If the `pageNumber` parameter is passed, size of the pages must be specified in the `pageSize` parameter.\n","schema":{"minimum":1,"type":"integer","format":"int32","default":1}},{"name":"pageSize","in":"query","description":"Number of catalogs to be retrieved per page.\n","schema":{"minimum":1,"type":"integer","format":"int32","default":60}},{"name":"sort","in":"query","description":"Fields to sort the response data by following order of the parameters from left to right.\nCan contain multiple fields in format: `field name`:`sort direction` separated by a comma.\nThe colon with `sort direction` parameter is redundant and descending order is taken only\nif it is equal to `desc` or `DESC`.\nAscending order is considered in any other case.\nSorting by `name` parameter works properly only if the `Accept-Language` header is set to\na specific language or is empty with default language specified in the configuration service.\n","schema":{"type":"string"}},{"name":"X-Total-Count","in":"header","description":"This flag specifies if the API client should receive a X-Total-Count header with the total number of elements that match the search filter.\n","schema":{"type":"boolean","default":false}},{"name":"Accept-Language","in":"header","description":"List of properties used to sort the results, separated by commas.\nPossible values:\n* `*` - each internationalized field is returned as a map containing all available translations\n* `en`, `en,de` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. First language is the one with highest priority.\n* `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not available exception is thrown. This list must contains any possible extension for internationalized fields included in sort param.\n","schema":{"type":"string","default":"*"}}],"responses":{"200":{"description":"The search was successful.","headers":{"X-Total-Count":{"description":"Total amount of catalogs for given criteria.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Catalog"}}}}},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Retrieving a catalog by id

> Get the catalog with the specified unique id that belongs to the tenant.<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"Catalog":{"required":["id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"Catalog's unique identifier, generated when the catalog is created."},"name":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Name of the catalog. Depending on the use of the Accept-Language header, it can be either a String or a Map<Locale, String>"}]},"description":{"allOf":[{"$ref":"#/components/schemas/Object"},{"description":"Description of the catalog must be a string if the Accept-Language header is specified on the request or a map of translations if the header is missing."}]},"status":{"allOf":[{"$ref":"#/components/schemas/Status"},{"description":"Visibility status of the catalog, computed at this moment."}]},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}}},"description":"Definition of a catalog"},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"Status":{"type":"string","description":"Visibility status of the catalog in this moment. This value is based on configured visibility properties, and is computed for the moment the request is handled. It answers the question 'Is the catalog visible now?'","enum":["not_visible","visible"]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"Metadata":{"type":"object","properties":{"version":{"type":"integer","description":"Catalog version","format":"int32"},"updatedAt":{"type":"string","description":"Timestamp indicating when the catalog was last modified compliant with the ISO 8601 standard.","format":"date-time"},"createdAt":{"type":"string","description":"Timestamp indicating when the catalog was created compliant with the ISO 8601 standard.","format":"date-time"}}},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}},"responses":{"response_NotFound_404":{"description":"Resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/catalog/{tenant}/catalogs/{catalogId}":{"get":{"tags":["Catalog management"],"summary":"Retrieving a catalog by id","description":"Get the catalog with the specified unique id that belongs to the tenant.\n","operationId":"GET-catalog-retrieve-catalog","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"catalogId","in":"path","description":"The unique id of the catalog.\n","required":true,"deprecated":false,"allowEmptyValue":false,"allowReserved":false,"schema":{"type":"string"}},{"name":"Accept-Language","in":"header","description":"List of language codes acceptable for the response.\nPossible values:\n* `*` - each internationalized field is returned as a map containing all available translations\n* `en`, `en,de` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. First language is the one with highest priority.\n* `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5` - each internationalized field is returned as a map containing translation specified by a header value. If translation is not available exception is thrown.\n","schema":{"type":"string","default":"*"}}],"responses":{"200":{"description":"Catalog was successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalog"}}}},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"$ref":"#/components/responses/response_NotFound_404"},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Upserting a catalog

> Update or create the specified catalog.\
> \*\*\*\
> \
> \### Required scopes\
> \
> \`catalog.catalog\_manage\`<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"UpdateCatalog":{"required":["name"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/Object","description":"Name of the catalog. Must be provided as a map of language codes to translations."},"description":{"$ref":"#/components/schemas/Object","description":"Description of the catalog. Must be provided as a map of language codes to translations."},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/UpdateMetadata"}},"description":"Payload for updating a catalog."},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"UpdateMetadata":{"type":"object","properties":{"version":{"type":"integer","description":"Catalog version, if provided optimistic locking will be used.","format":"int32"}}},"CreateCatalogResponse":{"required":["id"],"type":"object","properties":{"id":{"type":"string"}},"description":"Response for create catalog requests"},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}},"responses":{"response_NotFound_404":{"description":"Resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"response_Conflict_409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/catalog/{tenant}/catalogs/{catalogId}":{"put":{"tags":["Catalog management"],"summary":"Upserting a catalog","description":"Update or create the specified catalog.\n***\n\n### Required scopes\n\n`catalog.catalog_manage`\n","operationId":"PUT-catalog-update-catalog","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"catalogId","in":"path","description":"The unique id of the catalog.\n","required":true,"deprecated":false,"allowEmptyValue":false,"allowReserved":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCatalog"}}}},"responses":{"201":{"description":"The catalog has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCatalogResponse"}}}},"204":{"description":"The catalog has been successfully updated."},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied due to insufficient rights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"$ref":"#/components/responses/response_NotFound_404"},"409":{"$ref":"#/components/responses/response_Conflict_409"},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Removing catalog

> Remove the specified catalog.\
> \*\*\*\
> \
> \### Required scopes\
> \
> \`catalog.catalog\_manage\`<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}},"responses":{"response_NotFound_404":{"description":"Resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/catalog/{tenant}/catalogs/{catalogId}":{"delete":{"tags":["Catalog management"],"summary":"Removing catalog","description":"Remove the specified catalog.\n***\n\n### Required scopes\n\n`catalog.catalog_manage`\n","operationId":"DELETE-catalog-remove-catalog","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"catalogId","in":"path","description":"The unique id of the catalog.\n","required":true,"deprecated":false,"allowEmptyValue":false,"allowReserved":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"The catalog has been successfully removed."},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied due to insufficient rights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"$ref":"#/components/responses/response_NotFound_404"},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Partially updating a catalog

> Update the specified catalog, even partially.\
> \*\*\*\
> \
> \### Required scopes\
> \
> \`catalog.catalog\_manage\`<br>

```json
{"openapi":"3.0.0","info":{"title":"Catalog Management","version":"1.0.0"},"tags":[{"name":"Catalog management","description":"Retrieve lists of catalogs and manage catalog details."}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"catalog.catalog_manage":"Manage catalog","catalog.catalog_view":"View catalog"}}}}},"schemas":{"UpdateCatalogProperties":{"required":["metadata"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/Object","description":"Name of the catalog. Must be provided as a map of language codes to translations."},"description":{"$ref":"#/components/schemas/Object","description":"Description of the catalog. Must be provided as a map of language codes to translations."},"visibility":{"$ref":"#/components/schemas/VisibilityInformation"},"publishedSites":{"type":"array","description":"List of site identifiers on which the catalog is published.","items":{"type":"string"}},"categoryIds":{"type":"array","description":"List of root category identifiers that are assigned to the catalog.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/Metadata"}},"description":"Payload for partially updating a catalog."},"Object":{"type":"object","description":"Localized field that must be provided as a map of language codes to translations.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}]},"VisibilityInformation":{"type":"object","properties":{"visible":{"type":"boolean","description":"Flag indicating if the catalog is visible or not, set by the user. ","default":false},"from":{"type":"string","description":"Date and time from which the catalog is visible compliant with the ISO 8601 standard."},"to":{"type":"string","description":"Data and time from which the catalog is visible compliant with the ISO 8601 standard."}},"description":"Visibility configuration for a catalog"},"Metadata":{"type":"object","properties":{"version":{"type":"integer","description":"Catalog version","format":"int32"},"updatedAt":{"type":"string","description":"Timestamp indicating when the catalog was last modified compliant with the ISO 8601 standard.","format":"date-time"},"createdAt":{"type":"string","description":"Timestamp indicating when the catalog was created compliant with the ISO 8601 standard.","format":"date-time"}}},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true,"type":"array","items":{"type":"string"}}}}}},"paths":{"/catalog/{tenant}/catalogs/{catalogId}":{"patch":{"tags":["Catalog management"],"summary":"Partially updating a catalog","description":"Update the specified catalog, even partially.\n***\n\n### Required scopes\n\n`catalog.catalog_manage`\n","operationId":"PATCH-catalog-update-catalog-properties","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant's name.\n**Note**: The tenant should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"catalogId","in":"path","description":"The unique id of the catalog.\n","required":true,"deprecated":false,"allowEmptyValue":false,"allowReserved":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCatalogProperties"}}}},"responses":{"204":{"description":"The catalog has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"400":{"description":"Request was syntactically incorrect. Details will be provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied due to insufficient rights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An unexpected error prevented the server from fulfilling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
