Using the Item Schema API

Create an item schema

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

Query Parameters

NameTypeDescription

tenant*

string

environment*

string

fhrValidation

String

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

Headers

NameTypeDescription

Authorization*

string

Bearer token containing the following permission:

Request Body

NameTypeDescription

itemSchema*

object

itemSchema

{}
Error categoryDescription

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

NameTypeDescription

name*

string

Query Parameters

NameTypeDescription

tenant*

string

environment*

string

fhrValidation

String

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

Headers

NameTypeDescription

Authorization*

string

Bearer token containing the following permission:

Request Body

NameTypeDescription

itemSchema*

string

itemSchema to update

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

NameTypeDescription

name*

string

Name of itemSchema to delete.

version*

integer

​Version of itemSchema to delete.

Query Parameters

NameTypeDescription

tenant*

string

environment*

string

Headers

NameTypeDescription

Authorization*

string

Bearer token containing the following permission:

Get an item schema

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

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

Path Parameters

NameTypeDescription

name*

string

Name of itemSchema to get.

version*

integer

​Version of itemSchema to get.

Query Parameters

NameTypeDescription

tenant*

string

environment*

string

Headers

NameTypeDescription

Authorization*

string

Bearer token containing the following permission:

{{item schema}}

Last updated