{"swagger":"2.0","info":{"title":"clickouts api","description":"Host API documentation Click-Out Statistics API.","contact":{"name":"Shopr Team"},"version":"0.0.1-dev"},"host":"api.shopr.nl","basePath":"/stats","schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/{fingerprint}/clickouts":{"post":{"description":"Create a new click-out. Requests are accepted for eventual processing.","parameters":[{"name":"fingerprint","in":"path","description":"User fingerprint used for correlation purposes.","required":true,"type":"string"},{"name":"clickout","in":"body","schema":{"$ref":"#/definitions/clickout"}}],"responses":{"202":{"description":"202 response","schema":{"$ref":"#/definitions/string"}},"422":{"description":"Example: lowestPrice is greater than highestPrice.","schema":{"type":"array","items":{"$ref":"#/definitions/error_response"}}}}}},"/_internal_/ping":{"get":{"description":"Ping in milliseconds.","parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/status"}}}}},"/_internal_/status":{"get":{"description":"Current health check status.","parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/status"}}}}},"/_internal_/version":{"get":{"description":"API version.","parameters":[],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/string"}}}}}},"definitions":{"clickout":{"type":"object","description":"Represents an Offer click-out. It contains all the information needed to properly identify the offer, trace it ot the user navigating from search page, and relevant information about the offer at the click-out moment (e.g.: price, lowest price among other offers, etc.)","title":"clickout","required":["productId","seller","sellerProductId","price","deepUrl","lowestPrice","highestPrice","offerCount","offerPosition","categoryId","tracking","creationTime"],"properties":{"productId":{"description":"Product identifier","example":"584f4c7f4cedfd0005e17c19","type":"string"},"seller":{"description":"Seller/Retailer unique identifier","example":"klingel","type":"string"},"sellerProductId":{"description":"Product as identifier given by the seller/retailer","example":"SAND003","type":"string"},"price":{"description":"Offer price at the moment of the click-out","example":"67.00","type":"number","format":"float"},"deepUrl":{"description":"Full product URL at the retailer side","example":"http://www.klingel.nl/ProductDisplay?langId=31&catalogId=1000100000&storeId=100003&partNumber=460741&colorId=rood&attrId=G&vcp=gcqdjikm13m8iz&refID=Klingel_NL/Shopr/Dames/Schoenen/Pumps/Klassieke_pumps/04919/50X/&emsrc=Produktportale","type":"string"},"lowestPrice":{"description":"Lowest price among all offers","example":"59.99","type":"number","format":"float"},"highestPrice":{"description":"Seller/Retailer unique identifier","example":"87.00","type":"number","format":"float"},"offerCount":{"description":"Number of offers","default":"1","minimum":1,"example":"5","type":"integer","format":"int32"},"offerPosition":{"description":"Offer position among other offers (e.g.: first, second, etc.)","minimum":1,"example":"2","type":"integer","format":"int32"},"categoryId":{"description":"Category where the product was put into","example":"1234","type":"string"},"tracking":{"$ref":"#/definitions/tracking"},"creationTime":{"description":"When this click-out happened","example":"2016-12-22T11:56:52Z","type":"string","format":"date-time"}}},"error_code":{"type":"object","title":"error_code","required":["code","localized_string_code"],"properties":{"code":{"description":"Machine readable code for this specific error message","example":"100","type":"string"},"localized_string_code":{"description":"A localized description of the error code","example":"Lowest price cannot be bigger than highest price","type":"string"}}},"error_response":{"type":"object","title":"error_response","required":["error_codes"],"properties":{"message":{"description":"User-friendly message.","type":"string"},"error_codes":{"type":"array","items":{"$ref":"#/definitions/error_code"}},"fingerprint":{"description":"The request fingerprint associated with this error.","type":"string"}}},"status":{"type":"object","description":"Response for ping, health check and version","title":"status","required":["response"],"properties":{"response":{"example":"100ms | healthy | 0.0.1","type":"string"}}},"tracking":{"type":"object","description":"Series of attributes for tracking purposes","title":"tracking","required":["ipAddress","origin"],"properties":{"ipAddress":{"type":"string"},"origin":{"type":"string","enum":["shopr_website","shopr_mobile_web","shopr_iphone","shopr_ipad","shopr_android"]},"userAgent":{"type":"string"},"referrer":{"description":"Optional page referrer.","type":"string"}}}}}