This endpoint allows log user interactions with their OkHi location enabling you to get rich data insights.
Headers
Request Body
{"success": true}
{"code": 400,"message": "Specify either a location ID or a location object"}
If you don't supply a locationId then the user & location parameters are required
Properties Object
A dictionary of information that provides useful details to a given address interaction relevant to your business.
All fields except the ones listed in the table below are open to you to design to suit your business.
Here's an example of a properties JSON object that you could have in a checkout context:
Properties Object
{"brand": "acme","branch": "thehub","paymentMethod": "cash","currency": "KES","sendToQueue": true,"basket": [ {"sku":"RF67DESL1/XFA","value":180000.00,"name":"RF67DESL FDR with Twin Cooling Plus, 491 L","description":"Refrigerator is designed to improve the way you store food through an innovative 2-Door system.","category":"fridge","quantity":1 }, {"sku":"MG28J5255GS/SM","value":5500.00,"name":"MW5200J Grill Microwave Oven with Healthy Steam, 28 L","description":"Enjoy the flexibility to bake and microwave – all from one appliance","category":"microwave ovens","quantity":1,"weight":1.2 } ],"shipping": {"cost":120.00,"class":"Flat rate","expectedDeliveryDate":"2019-08-12T09:42:22.526Z" }}
User Object
This is only required if you don't have an OkHi location ID
Full example payload for an ecommerce transaction:
{"id": "{{uniqueTransactionId}}","useCase": "e-commerce","locationId": "WtyVrLr3yn","value": 185500,"user": {"firstName":"E","lastName":"M","phone":"+254712345678" },"properties": {"brand":"acme","branch":"thehub","paymentMethod":"cash","sendToQueue":true,"basket": [ {"sku":"RF67DESL1/XFA","value":180000,"name":"RF67DESL FDR with Twin Cooling Plus, 491 L", "description": "Refrigerator is designed to improve the way you store food through an innovative 2-Door system.",
"category":"fridge","quantity":1 }, {"sku":"MG28J5255GS/SM","value":5500,"name":"MW5200J Grill Microwave Oven with Healthy Steam, 28 L","description":"Enjoy the flexibility to bake and microwave – all from one appliance","category":"microwave ovens","quantity":1,"weight":"1 kg" } ],"shipping": {"cost":120,"class":"Flat rate","expectedDeliveryDate":"2019-08-12T09:42:22.526Z" } }}
IMPORTANT: For production please switch this endpoint to https://server.okhi.co/v1/interactions