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