Using the Items API

Upsert items

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

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

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

items*

array

List of items

[
 {
  itemId: {{Json item id}},
  receiptId: {{receipt id}}
 }
]
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

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

items*

array

List of items with attributes to patch

[
 {
  itemId: {{Json item id}},
  receiptId: {{request id}}
 }
]

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

NameTypeDescription

tenant*

string

environment*

string

Headers

NameTypeDescription

Authorization*

string

Bearer token containing the following permission:

Request Body

NameTypeDescription

jsonItemIds*

array

List of jsonItemId

[
 {
  itemId: {{Json item id}},
  receiptId: {{request id}}
 }
]
Example of an item deletion body:
[
    {
        "id": "A0001",
        "catalogVersion": 1,
        "type": "product"
    }
]

Last updated