Create a webhook
res = po_client.request("post", "/api/webhooks", **{
"app_id": 4, # 4 is fine
"event": "product.update", # product.update/product.create/product.delete/customer.create/customer.delete/customer.update/transaction.closed
"action": {
"action": "request",
...
"integration_setting_id": 123124, # use any unique value for now - used to identify which webhook belongs to what addon
"timeout": 5000,
"url": "http://localhost:6544/events",
"data": { # skip it if you don't need to receive anything except product odID
# - optional
"custom_field": "product.update"
},
"headers": { # skip it if you don't need any special headers in the url
"custom_header": "123"
}
}
}, use_json=True)
...