Here is an example of a custom Python integration (basket & hybrid mode) using the "request" library
First install request
pip install requests
Then make the poke using a similar code :
import requests
import json
operation_id = '478aa07fa86b29703f73c78afe17f650 '
api_key = '9c936dbf1cfa00bc11a8961238d34fb1'
cart = [{"price": "10.15", "quantity": "1",'category_id':"145"}, {"price": "18.15", "quantity": "1","category_id": "157"}]
payload_data = {"email": "[email protected]", "user_uid": "12211", "order_uid": "1", "segment": "A", "language": "en", "locale": "en", "item_uid": "111222", "item_value": "100", "item_currency": "EUR", "cart": cart}
payload_data_dump = json.dumps(payload_data)
headers = {'X-LuckyApiKey': api_key, 'Content-Type': 'application/json'}
response = requests.post("https://www.luckycycle.com/api/v1/operations/" + operation_id + "/poke", headers=headers, data=payload_data_dump)
print response.text
