LogoLogo
Support
Product Discovery Developer Guide
Product Discovery Developer Guide
  • 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

Copyright @ 2024 Crownpeak Technology, Inc. All rights reserved.

On this page
  • Create an item schema
  • Update an item schema
  • Delete an item schema
  • Get an item schema
  1. Item catalog management
  2. How to work with Items
  3. Item Schema

Using the Item Schema API

PreviousNested Item SchemasNextDefaultLocale API

Last updated 8 months ago

Create an item schema

POST https://items.attraqt.io/item-schemas

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

fhrValidation

String

True/false. Enforces specific validation to comply with the Fredhopper data model

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

Request Body

Name
Type
Description

itemSchema*

object

itemSchema

{}
{
    // Response
}
{
    // Response
}
Error category
Description

ITEM_SCHEMA_TENANT_ENV

Tenant and Environment are required

ITEM_SCHEMA_NAME

Name required

ITEM_SCHEMA_VERSION

version should not be set when creating a itemSchema

ITEM_SCHEMA_ATTRIBUTES

schema contains an invalid attribute

The schema version is managed by the API, don't include it on creation. When you create an item schema the version is set to 1.

Example of an item schema creation body:
{
    "name": "product",
    "attributes": [
        {
            "name": "title",
            "type": "TEXT"
        },
        {
            "name": "description",
            "type": "TEXT"
        }
    ],
    "nestedItemSchemas": [
        {
            "attributes": [
                {
                    "name": "price",
                    "type": "INTEGER"
                },
                {
                    "name": "color",
                    "type": "TEXT"
                }
            ]
        }
    ]
}

Update an item schema

PUT https://items.attraqt.io/item-schemas/{name}

This endpoint allows you to update an existing item schema.

Path Parameters

Name
Type
Description

name*

string

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

fhrValidation

String

True/false. Enforces specific validation to comply with the Fredhopper data model

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

Request Body

Name
Type
Description

itemSchema*

string

itemSchema to update

{
    // Response
}
{
    // Response
}

Updating an item schema will increment his version by 1.

Delete an item schema

DELETE https://items.attraqt.io/item-schemas/{name}/{version}

Path Parameters

Name
Type
Description

name*

string

Name of itemSchema to delete.

version*

integer

โ€‹Version of itemSchema 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
}

Get an item schema

GET /item-schemas/{name}/{version}

Get a full item schema by providing its slug and version.

Path Parameters

Name
Type
Description

name*

string

Name of itemSchema to get.

version*

integer

โ€‹Version of itemSchema to get.

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token containing the following permission:

{{item schema}}
{
    // Response
}
๐Ÿ›’
This API requires Authentication.