Using the Item Schema API

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

{}
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

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

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:

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}}

Last updated