Productfeed ‐ add, update or delete products - Heyloyalty/api GitHub Wiki
Still in development!! Since this is still in development, features and options might be added later. Existing documentation will
If prefered, you can add, delete or update products directly via our API. After setting up a productfeed, you can use a GET request to get the fields for your specific productfeed.
GET /integrations/productfeed-mapping/{id}
The productfeed has the following endpoints:
POST /loyalty/v1/products/{productFeedId}
The POST function will create (or update) a product. if one already exists, the productId will be used as a unique identifier.
It takes a json-object:
Post:
[
{
"productId": "Traebriketter",
"salePrice": "1500.00 DKK"
},
{
"productId": "8 mm Samba",
"salePrice": "1800.00 DKK"
}
]
Add any field, already created on the productfeed mapping, relevant for the product.
Example
[{
"productId": "17714",
"Productname": "Ophold p\u00e5 Hotel Norden",
"Productpageurl": "https:\/\/dealhunter.dk\/deals\/ophold-pa-hotel-norden-17714",
"Productpictureurl": "https:\/\/heyloyalty.s3.amazonaws.com\/uploads\/Zc4p0dd_293x196.jpg",
"Categoryid": "1",
"Categoryname": "Rejser",
"Brand": "Hotel Norden",
"Description": "<p>Inviter en du holder af med på miniferie . Indeholder flot dobbeltværelse, 2-retters menu hver aften, morgenbuffet hver morgen samt adgang til indendørs pool.<\/p>",
"Price": "999",
"Retailprice": "2800",
"Discount": "65",
"PlusPrice": "899",
"Instock": true,
"account_id": 1
}]
If you need to remove a product, you can do so, by utilizing DELETE
DELETE /loyalty/v1/products/{productFeedId}
DELETE takes a json-object, containing a single productId. In the below example, two products will be deleted from the productfeed:
[
"Traebriketters",
"8 mm Sambas"
]