Crownpeak
  • Product Discovery Developer Guide
  • πŸ›’Item catalog management
    • What is the Items API?
    • How to work with Items
      • Item Schema
        • Attributes
        • Nested Item Schemas
        • Using the Item Schema API
        • DefaultLocale API
        • Onboarding on/migrating to Fredhopper
        • List of Reserved Attributes
      • Category Tree
        • Using the Category Tree API
        • Onboarding on XO
      • Item Catalog
        • Using the Catalog API
      • Items
        • Using the streaming Items API
        • Using the batch Items API
    • Step by Step guide
      • Step by step guide for Fredhopper customers
    • Feedback
      • Using the Feedback API
    • Authorization to APIs
    • Troubleshooting API errors
  • 🎯XO Recommendations
    • Introduction
    • Using the Recommendations API
    • Setting up the Chrome extension
    • Micro-segmentation
    • XO Legacy APIs
  • πŸ”ŽXO Search
    • Introduction
    • Getting started
    • API Reference
      • Search API
      • Autocomplete API (Beta)
      • Product Suggest API
    • API Parameters
      • Search
      • Pagination
      • Faceting
      • Sorting
      • Grouping
      • Filtering
      • Disable features
      • Response mask
      • Context
    • Configuration limitation
  • πŸ§ͺA/B testing
    • Fredhopper A/B testing
      • Integration steps for a non-caching solution
      • Integration steps for a caching solution
        • Java SDK Integration
          • Setup
          • Retrieve running A/B tests - Java SDK
          • Filter and request variant - Java SDK
          • Extending the SDK
        • Manual A/B tests integration
          • Retrieve running A/B tests
          • Filter out irrelevant A/B tests
          • Assign variants to user
          • Request variant for page
        • Limitations and Best Practices
  • πŸ“šResources
    • Glossary
    • Best Practices
      • Tracker Best Practices
      • Items API Best Practices
      • Fredhopper Data Configuration Best Practices
      • Fredhopper Query Response Best Practices
      • Fredhopper Merchandising Studio Best Practices
    • Privacy Notice
  • Archived Pages
    • FHR Tracking plan
    • XO Tracking plan
    • The Tracking API and JS Library
      • What to Track
        • Generic Actions
          • View
          • Click
          • Add to Cart
          • Remove from Cart
          • Purchase
        • Custom Actions
      • Initializing the JavaScript Library
      • REST API Technical Documentation
Powered by GitBook
On this page
  • Create a catalog
  • Multiple category trees
  • Delete a catalog
  • Activate a catalog version
  • Get active catalogue version
  • List catalogs
  • Api errors
  1. Item catalog management
  2. How to work with Items
  3. Item Catalog

Using the Catalog API

PreviousItem CatalogNextItems

Last updated 3 months ago

Create a catalog

POST /catalogs

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

Request Body

Name
Type
Description

catalog*

object

catalog

{{catalog.version}}
{
    // Response
}
{
    // Response
}
{
    // Response
}
{
    // Response
}

Remember! Catalog API can handle only 2 catalogs at the same time. If this limit is reached, one inactive catalog must be deleted by using the API before creating a new one. Determining the inactive catalog is done by listing all catalogs API.

Create a catalog returns the created catalog version. The catalog state is managed by the API. New catalogs are always set as Inactive and you must use the "Activate" method to this activate it.

The catalogCategoryTrees nested JSON object is optional.

Example of a catalog creation body:
{
    "catalogItemSchemas": [
        {
            "name": "product",
            "version": 1
        }
    ],
    "catalogCategoryTrees": [
       {
           "name": "root_name",
           "version": 2
       }
    ]
}

Multiple category trees

In the standard usecase the catalog will contain one single category tree. However, based on the data model used the category tree might grow and get harder to manage. We consider category trees larger than 4 MB too large, and we recommend splitting the tree if this limit is approached.

One single category tree cannot exceed 4 MB in size. Use multiple trees if that is the case.

Example of catalog creation with multiple category trees
{
    "catalogItemSchemas": [
        {
            "name": "product",
            "version": 1
        }
    ],
    "catalogCategoryTrees": [
        {
            "name": "categoryTreeDividedPart1",
            "version": 2
        },
        {
            "name": "categoryTreeDividedPart2",
            "version": 1
        }
    ]
}

Delete a catalog

DELETE https://items.attraqt.io/catalogs/{version}

Path Parameters

Name
Type
Description

version*

integer

​Version of catalog to delete.

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

{
    // Response
}
{
    // Response
}

Only Inactive catalogs can be deleted.

Attention: removing a catalog will delete items attached to this catalog, this operation can't be undone

Activate a catalog version

POST https://items.attraqt.io/catalogs/activate/{version}

Path Parameters

Name
Type
Description

version*

integer

​Version of catalog to activate.

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

minItemCount

integer

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

{
    // Response
}
{
    // Response
}
{
    // Response
}
{
    // Response
}

Get active catalogue version

GET https://items.attraqt.io/catalogs/active

Get the catalog version currently promoted

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

{{catalog}}
{
    // Response
}

List catalogs

GET https://items.attraqt.io/catalogs

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

Api errors

Error category
Description

CATALOG_TENANT_ENV

Tenant and Environment are required

CATALOG_SCHEMAS

Error in given Item Schema

CATALOG_CATEGORY_TREES

Error in given Category tree

CATALOG_LIMIT_REACHED

The limit of 2 catalogs is reached

CATALOG_ALREADY_ACTIVE

The catalog is already active or in activation state

CATALOG_FHR_FAILED

Error in FHR api

CATALOG_NOT_ACTIVE

The catalog must be in activating state to perform the action

CATALOG_DELETION_ACTIVE

The catalog must be inactive to be deleted

The minimum number of items expected in this catalog activation. If the item processing pipeline detects less items than this number, then the catalog activation will fail. The feedback message in will indicate both this number and the detected number.

πŸ›’
This API requires Authentication.
the corresponding Feedback API