Items API The Items API allows you to manage your item catalog in real-time. Specifications Add a new item to the catalog or update it if it already existed. PUT /{environment}/items/{item_type}/{item_id} Parameters Type Name Schema Path environment required string Path item_id required string Path item_type required string Body body optional Item Responses HTTP Code Description Schema 200 The item was successfully updated No Content 401 Access token is missing or invalid No Content 404 The item id is not yet known in the system No Content 415 The item information provided does not match the item information specification No Content 422 The body is not of the right type, JSON expected No Content Consumes application/json Tags env cURL Example $ curl --location --request PUT 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}/client_item_id_001' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer X' \ --data-raw '{ "environment": "{environment}", "item_id": "client_item_id_001", "item_type": "article", "title": "Froomle title", "description": "Lorem ipsum ... Article/product full text", "uri": "https://www.froomle.com/client_item_id_001", "categories": [ "/Sports/Football", "/News/National" ], "tags": [ "Red Devils", "Martinez", "Heizel", "Qatar2022" ], "images": [ "https://www.froomle.com/content/client_item_id_001.jpg" ], "publication_datetime": "2021-07-29T13:02:03+02:00", }' Delete an item from the catalog DELETE /{environment}/items/{item_type}/{item_id} Parameters Type Name Schema Path environment required string Path item_id required string Path item_type required string Responses HTTP Code Description Schema 200 The item was successfully disabled No Content 401 Access token is missing or invalid No Content 404 The item id is not yet known in the system No Content Tags env cURL Example $ curl --location --request DELETE 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}/client_item_id_001' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer X' Enable the item, can be used to reenable a previously disabled item. POST /{environment}/items/{item_type}/{item_id}/enable Parameters Type Name Description Schema Path environment required The environment for which you want to enable an item string Path item_id required The item to enable string Path item_type required The item_type of the item to be enabled string Responses HTTP Code Description Schema 200 OK No Content 400 Error in the request No Content 500 Error in processing the request No Content cURL Example $ curl --location --request POST 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}/client_item_id_001/enable' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer X' Disable the item, disabling an item means it won’t be recommended again, but its data can still be used for model training. POST /{environment}/items/{item_type}/{item_id}/disable Parameters Type Name Description Schema Path environment required The environment for which you want to disable an item string Path item_id required The item to disable string Path item_type required The item_type of the item to be disabled string Responses HTTP Code Description Schema 200 OK No Content 400 Error in the request No Content 500 Error in processing the request No Content cURL Example $ curl --location --request POST 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}/client_item_id_001/disable' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer X' Retrieve an item from the catalog. GET /{environment}/items/{item_type}/{item_id} Parameters Type Name Schema Path environment required string Path item_id required string Path item_type required string Responses HTTP Code Description Schema 200 The item was successfully retrieved No Content 401 Access token is missing or invalid No Content 404 The item id is not yet known in the system No Content Tags env cURL Example $ curl --location --request GET 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}/client_item_id_001' \ --header 'Authorization: Bearer X' Retrieve a list of all item IDs of the given type GET /{environment}/items/{item_type} Parameters Type Name Description Schema Path environment required The environment for which you want to disable all items string Path item_type required The item_type of the items string Responses HTTP Code Description Schema 200 OK No Content 400 Error in the request No Content 500 Error in processing the request No Content cURL Example $ curl --location --request GET 'https://{subdomain}.froomle.com/api/{environment}/items/{item_type}' \ --header 'Authorization: Bearer X' Definitions Item The body of the create POST and update PUT requests, as well as the return value of GET requests. Name Description Schema categories optional The relevant of the categories of the item. < string > array environment required The environment in which the item will reside string images optional < object > array item_attributes optional ItemAttribute item_id required The identifier of the item string item_type required The type of the entity (e.g. item, article, video, …). These types are Froomle-defined, please consult your solutions architect for the correct type. enum ({item_type}) language optional string tags optional < string > array title optional string uri optional string ItemAttribute Information that might be relevant for analysis, but not for the filtering of the recommendations. Name Schema name optional string value optional object