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
  • Upsert items
  • Patch items
  • Delete items
  1. Item catalog management
  2. How to work with Items
  3. Items

Using the streaming Items API

PreviousItemsNextUsing the batch Items API

Last updated 2 days ago

Required fields are marked with a red asterisk (*) in the Name column.

Use the streaming Items API for partial real time item updates throughout the day.

Upsert items

POST https://items.attraqt.io/items

This endpoint allows you to create or modify a list of items.

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

Request Body

Name
Type
Description

items*

array

List of items

[
 {
  itemId: {{item id}},
  receiptId: {{receipt id}}
 }
]
{
    // Response
}
{
    // Response
}
Example of an item upsert body:
[
    {
        "id": "A0001",
        "catalogVersion": 1,
        "type": "product",
        "attributes": {
            "title": "My item",
            "description": "This is my item.",
            "categories": [ "category_id_1","category_id_2"]
        }
    }
]

If a category tree has been defined for a catalogue version, the categories attribute becomes mandatory.

Please keep the message size of each API call under 1MB for better performance.

Patch items

PATCH https://items.attraqt.io/items

This method allows you to patch attributes of given items.

Unlike the upsert, patch an item will only update attributes that are present in the request. It means that you don't need to send the whole item, but only the updated attributes.

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

Request Body

Name
Type
Description

items*

array

List of items with attributes to patch

[
 {
  itemId: {{item id}},
  receiptId: {{receipt id}}
 }
]
{
    // Response
}

Mandatory attributes aren't checked with this method. Only the attribute's types are validated.

Example of an item patch body:
[
    {
        "id": "A0001",
        "catalogVersion": 1,
        "type": "product",
        "attributes": {
            "title": "My patched title",
        }
    }
]

Delete items

POST https://items.attraqt.io/items/delete

This endpoint allows you to delete items.

Query Parameters

Name
Type
Description

tenant*

string

environment*

string

Headers

Name
Type
Description

Authorization*

string

Bearer token

Request Body

Name
Type
Description

item IDs*

array

List of item IDs

[
 {
  itemId: {{item id}},
  receiptId: {{receipt id}}
 }
]

Example of item deletion body
[
    {
        "id": "A0001",
        "catalogVersion": 1,
        "type": "product"
    }
]

🛒
This API requires Authentication.
Your tenant ID
Your environment ID
Your tenant ID
Your environment ID
Your tenant ID
Your environment