{"swagger":"2.0","info":{"description":"Initial documentation for abandoned cart API","version":"1.0.0","title":"AbandonedCart API"},"host":"checkout-abandonedcart.travix.com","basePath":"/v1","paths":{"/users":{"post":{"tags":["AbandonedCart"],"summary":"Start tracking user during checkout flow.","description":"","operationId":"StartTrackUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"User information","required":true,"schema":{"$ref":"#/definitions/userToTrack"}}],"responses":{"200":{"description":"Ok"},"400":{"description":"Invalid data"}}}},"/users/{id}":{"put":{"tags":["AbandonedCart"],"summary":"Update user's tracking step","description":"","operationId":"UpdateUserTrack","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"id","type":"string","required":true,"description":"UserId"},{"in":"body","name":"body","description":"User information","required":true,"schema":{"$ref":"#/definitions/userTrackingUpdate"}}],"responses":{"200":{"description":"Ok"},"400":{"description":"Invalid data"}}}}},"definitions":{"userTrackingUpdate":{"type":"object","properties":{"step":{"type":"number","example":2}}},"userToTrack":{"type":"object","properties":{"emailHash":{"type":"string","format":"SHA-256 hash","example":"58029b65653b0b7407ec39ed7aca2783658aa8ba2a4ab9731df2272b81739bb2"},"airlineCode":{"type":"string","format":"IATA Code","example":"HV"},"affiliate":{"type":"string","format":"Affiliate code","example":"CH"},"channel":{"type":"string","format":"Channel","example":"skyscanner"},"totalPrice":{"type":"number","example":613.95},"language":{"type":"string","format":"Language code","example":"EN"},"flightResultUrl":{"type":"string","format":"affiliate url","example":"https://www.vliegwinkel.nl/vluchtresultaten?out0_dep_all=false&out0_dep=AMS&out0_arr_all=false&out0_arr=TPE&in0_date=2017-09-08&out0_date=2017-08-27&adt=1&chd=0&inf=0&cls=Y&utm_source=newsletter&utm_medium=email&utm_campaign=ascemail1"},"firstArrivalCity":{"type":"string","example":"Barcelona"},"firstArrivalCountry":{"type":"string","format":"Two letters","example":"ES"},"firstArrivalDate":{"type":"string","format":"YYYY-MM-dd","example":"2017-12-11"},"firstArrivalTime":{"type":"string","format":"hh:mm","example":"09:35"},"firstArrivalIataCode":{"type":"string","format":"IATA Code","example":"BCN"},"firstDepartureCity":{"type":"string","example":"Amsterdam"},"firstDepartureCountry":{"format":"Two letters","type":"string","example":"NL"},"firstDepartureDate":{"type":"string","format":"yyyy-MM-dd","example":"2017-09-28"},"firstDepartureTime":{"type":"string","format":"hh:mm","example":"20:10"},"firstFlightDuration":{"type":"string","format":"hh:mm","example":"20:10"},"firstTotalStops":{"type":"string","example":"2"},"firstDepartureIataCode":{"type":"string","format":"IATA Code","example":"AMS"},"secondArrivalCity":{"type":"string","example":"Barcelona"},"secondArrivalCountry":{"type":"string","format":"Two letters","example":"ES"},"secondArrivalDate":{"type":"string","format":"YYYY-MM-dd","example":"2017-12-11 "},"secondArrivalTime":{"type":"string","format":"hh:mm","example":"09:35"},"secondArrivalIataCode":{"type":"string","format":"IATA Code","example":"BCN"},"secondDepartureCity":{"type":"string","example":"Amsterdam"},"secondDepartureCountry":{"format":"Two letters","type":"string","example":"NL"},"secondDepartureDate":{"type":"string","format":"yyyy-MM-dd","example":"2017-09-28"},"secondDepartureTime":{"type":"string","format":"hh:mm","example":"20:10"},"secondFlightDuration":{"type":"string","format":"hh:mm","example":"20:10"},"secondTotalStops":{"type":"string","example":"2"},"secondDepartureIataCode":{"type":"string","format":"IATA Code","example":"AMS"},"thirdArrivalCity":{"type":"string","example":"Barcelona"},"thirdArrivalCountry":{"type":"string","format":"Two letters","example":"ES"},"thirdArrivalDate":{"type":"string","format":"YYYY-MM-dd","example":"2017-12-11"},"thirdArrivalTime":{"type":"string","format":"hh:mm","example":"09:35"},"thirdArrivalIataCode":{"type":"string","format":"IATA Code","example":"BCN"},"thirdDepartureCity":{"type":"string","example":"Amsterdam"},"thirdDepartureCountry":{"format":"Two letters","type":"string","example":"NL"},"thirdDepartureDate":{"type":"string","format":"yyyy-MM-dd","example":"2017-09-28"},"thirdDepartureTime":{"type":"string","format":"hh:mm","example":"20:10"},"thirdFlightDuration":{"type":"string","format":"hh:mm","example":"20:10"},"thirdTotalStops":{"type":"string","example":"1"},"thirdDepartureIataCode":{"type":"string","format":"IATA Code","example":"AMS"}}}}}