{"swagger":"2.0","info":{"title":"api-fraud","description":"API documentation for the fraud service","contact":{"name":"Frozone","email":"frozone@hbc.com"},"version":"0.0.0-slava"},"host":"fraud-frozone","basePath":"/","schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/decision":{"post":{"description":"Consumes the decision about a transaction (usually meant for manual review) and triggers OMS to process/cancel the order","parameters":[{"name":"Decision","in":"body","schema":{"$ref":"#/definitions/Decision"}}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}},"/transaction":{"post":{"description":"Provides decision about a transaction by supplying order or other information","parameters":[{"name":"Transaction","in":"body","schema":{"$ref":"#/definitions/Transaction"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Decision"}},"400":{"description":"400 response","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}}},"definitions":{"AdditionalData":{"type":"object","description":"Envelope data","title":"AdditionalData","required":["inAuthId"],"properties":{"inAuthId":{"type":"string","format":"uuid"}}},"Address":{"type":"object","description":"General address model","title":"Address","required":["name","streetLineOne","city","state","zip","country"],"properties":{"name":{"type":"string"},"streetLineOne":{"type":"string"},"streetLineTwo":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"}}},"CreditCard":{"type":"object","description":"A customer's complete credit card information","title":"CreditCard","required":["nameOnCard","billingAddress","cardType","cardNumber","authorizedAmount","fullAmount","expiryDate","authCode","responseCode","transactionNumber","avsResponse"],"properties":{"nameOnCard":{"type":"string"},"billingAddress":{"$ref":"#/definitions/Address"},"cardType":{"type":"string"},"cardNumber":{"type":"string"},"authorizedAmount":{"type":"number","format":"float"},"fullAmount":{"type":"number","format":"float"},"expiryDate":{"description":"MM-YY that the credit card expires","type":"string"},"authCode":{"description":"CVV code on the back of the card","type":"string"},"responseCode":{"type":"integer","format":"int32"},"merchantId":{"type":"integer","format":"int32"},"registerNumber":{"type":"string"},"transactionNumber":{"type":"string"},"avsResponse":{"description":"Address Verification System response, Codes are available here: https://www.chasepaymentech.com/address_verification_service.html","type":"string"}}},"Customer":{"type":"object","description":"Customer model","title":"Customer","required":["customerType","accountId","creationDate","firstName","lastName","emailAddress"],"properties":{"customerType":{"type":"string","enum":["guest","registered","employee"]},"accountId":{"type":"string"},"creationDate":{"type":"string","format":"date"},"firstName":{"type":"string"},"lastName":{"type":"string"},"emailAddress":{"type":"string"}}},"DBRecord":{"type":"object","description":"Response model to OMS containing the transaction they've sent and the decision we've made","title":"DBRecord","required":["transactionId","transaction","decision"],"properties":{"transactionId":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date"},"createdDate":{"description":"Date this record was first created within the database","type":"string","format":"date"},"transaction":{"$ref":"#/definitions/Transaction"},"decision":{"$ref":"#/definitions/Decision"}}},"Decision":{"type":"object","description":"Defines decision information","title":"Decision","required":["transactionId","recommendationCode","totalScore"],"properties":{"transactionId":{"type":"string"},"recommendationCode":{"type":"string","enum":["reject","review","accept"]},"crossReference":{"type":"string","format":"uuid"},"rulesTripped":{"type":"string"},"totalScore":{"type":"integer","format":"int32"},"remarks":{"type":"string"}}},"Error":{"type":"object","description":"Error response model","title":"Error","required":["message","error"],"properties":{"message":{"description":"Error description message","example":"Oops, something went wrong!","type":"string"},"error":{"description":"Error code","example":"invalid_email","type":"string"}}},"Item":{"type":"object","description":"Single item","title":"Item","required":["svsNumber","skuNumber","currentStatus","department","description","price","extendedPrice","quantity","groupNumber","shippingAddress","shippingMethod","shippingCountry"],"properties":{"svsNumber":{"description":"Product style number (parent number)","type":"integer","format":"int32"},"skuNumber":{"description":"HBC internally generated number for items (alias SKN)","type":"integer","format":"int32"},"upcNumber":{"description":"The number on the barcode that could be used across different retailers","type":"integer","format":"int32"},"classNumber":{"description":"Signifies business category of an item (pants, tops, shirts, etc.)","type":"integer","format":"int32"},"color":{"type":"string"},"size":{"type":"string"},"currentStatus":{"type":"string"},"department":{"type":"integer","format":"int32"},"signOnDelivery":{"type":"string"},"giftWrapped":{"type":"boolean"},"costAmount":{"type":"number","format":"float"},"marginAmount":{"type":"number","format":"float"},"description":{"type":"string"},"price":{"description":"Price of single item","type":"number","format":"float"},"extendedPrice":{"description":"Total price of all items ordered","type":"number","format":"float"},"quantity":{"type":"integer","format":"int32"},"groupNumber":{"type":"integer","format":"int32"},"shippingAddress":{"$ref":"#/definitions/Address"},"shippingMethod":{"type":"string"},"shippingCountry":{"type":"string"}}},"Promo":{"type":"object","description":"Promotion model","title":"Promo","required":["promotionCode","promotionAmount"],"properties":{"promotionCode":{"type":"string"},"promotionAmount":{"description":"Dollar amount discounted by the promotion","type":"number","format":"float"}}},"Transaction":{"type":"object","description":"Defines data expected to come in from OMS describing a transaction","title":"Transaction","required":["orderId","groupId","orderTotal","shippingCost","currencyCode","storeNumber","banner","creditCard","items","source","customer"],"properties":{"orderId":{"type":"string"},"groupId":{"type":"string"},"orderTotal":{"type":"number","format":"float"},"shippingCost":{"type":"number","format":"float"},"currencyCode":{"type":"string"},"storeNumber":{"type":"integer","format":"int32"},"salesRep":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date"},"banner":{"type":"string","enum":["lat","s5a","o5a","bay"]},"creditCard":{"$ref":"#/definitions/CreditCard"},"promos":{"type":"array","items":{"$ref":"#/definitions/Promo"}},"items":{"type":"array","items":{"$ref":"#/definitions/Item"}},"ipAddress":{"type":"string"},"source":{"description":"Order source (web, store, etc)","type":"string"},"customer":{"$ref":"#/definitions/Customer"},"additionalData":{"$ref":"#/definitions/AdditionalData"}}}}}