{ "info" : { "name" : "api-fraud", "schema" : "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description" : { "content" : "API documentation for the fraud service" }, "version" : "0.0.0-slava" }, "item" : [ { "name" : "Decisions", "item" : [ { "request" : { "url" : { "raw" : "{{BASE_URL}}/decision", "host" : [ "{{BASE_URL}}" ], "path" : [ "decision" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Consumes the decision about a transaction (usually meant for manual review) and triggers OMS to process/cancel the order" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"crossReference\" : \"b99085b5-c327-488c-92fb-9fed3599adb4\",\n \"recommendationCode\" : \"accept\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"079daa65367a\",\n \"remarks\" : \"6a54abbf882c\",\n \"transactionId\" : \"b03da809f3c9\"\n}", "mode" : "raw" } }, "name" : "POST /decision", "description" : { "content" : "Consumes the decision about a transaction (usually meant for manual review) and triggers OMS to process/cancel the order" }, "event" : [ { "listen" : "test", "script" : { "exec" : [ "pm.test(\"POST requests should return 2xx\", function () {", " pm.response.to.be.success;", "});" ], "type" : "text/javascript" } } ], "response" : [ { "name" : "Example 200 - unit", "originalRequest" : { "url" : { "raw" : "{{BASE_URL}}/decision", "host" : [ "{{BASE_URL}}" ], "path" : [ "decision" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Consumes the decision about a transaction (usually meant for manual review) and triggers OMS to process/cancel the order" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"crossReference\" : \"b99085b5-c327-488c-92fb-9fed3599adb4\",\n \"recommendationCode\" : \"accept\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"079daa65367a\",\n \"remarks\" : \"6a54abbf882c\",\n \"transactionId\" : \"b03da809f3c9\"\n}", "mode" : "raw" } }, "code" : 200 }, { "name" : "Example 400 - [Error]", "originalRequest" : { "url" : { "raw" : "{{BASE_URL}}/decision", "host" : [ "{{BASE_URL}}" ], "path" : [ "decision" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Consumes the decision about a transaction (usually meant for manual review) and triggers OMS to process/cancel the order" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"crossReference\" : \"b99085b5-c327-488c-92fb-9fed3599adb4\",\n \"recommendationCode\" : \"accept\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"079daa65367a\",\n \"remarks\" : \"6a54abbf882c\",\n \"transactionId\" : \"b03da809f3c9\"\n}", "mode" : "raw" } }, "body" : "[ {\n \"message\" : \"Oops, something went wrong!\",\n \"error\" : \"invalid_email\"\n} ]", "code" : 400 } ], "type" : "item" } ], "type" : "folder" }, { "name" : "Transactions", "item" : [ { "request" : { "url" : { "raw" : "{{BASE_URL}}/transaction", "host" : [ "{{BASE_URL}}" ], "path" : [ "transaction" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Provides decision about a transaction by supplying order or other information" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"orderId\" : \"ea9328990772\",\n \"promos\" : [ {\n \"promotionCode\" : \"f6cb5f70fa61\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"f476c71011c9\",\n \"banner\" : \"bay\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"51c23f136ac3\",\n \"billingAddress\" : {\n \"city\" : \"fb88b6f09bca\",\n \"name\" : \"a241953f5948\",\n \"zip\" : \"32e9206803f8\",\n \"state\" : \"742f070605b7\",\n \"streetLineOne\" : \"badc34b046a9\",\n \"country\" : \"7d51b739000a\",\n \"streetLineTwo\" : \"eed37ad19a84\"\n },\n \"transactionNumber\" : \"b5a9870cdce7\",\n \"nameOnCard\" : \"b677866391ea\",\n \"expiryDate\" : \"031e6d9d24ec\",\n \"merchantId\" : 1,\n \"authCode\" : \"64b2319e1ef7\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"21e8e023123e\",\n \"cardType\" : \"b3c5dd2f4104\",\n \"cardNumber\" : \"b23660980a1c\"\n },\n \"customer\" : {\n \"emailAddress\" : \"3acbd29ea42d\",\n \"customerType\" : \"registered\",\n \"accountId\" : \"9bc08f0f0cba\",\n \"lastName\" : \"698690288edd\",\n \"firstName\" : \"7a3420f16060\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"32c4e9e9a387\",\n \"storeNumber\" : 1,\n \"source\" : \"9a0f9854bcd5\",\n \"salesRep\" : \"59ee72e5628f\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"4974daa84e98\",\n \"description\" : \"d4ffb36cfdcd\",\n \"price\" : 1,\n \"svsNumber\" : 1,\n \"upcNumber\" : 1,\n \"department\" : 1,\n \"costAmount\" : 1,\n \"groupNumber\" : 1,\n \"marginAmount\" : 1,\n \"classNumber\" : 1,\n \"color\" : \"a884f9a6f30a\",\n \"shippingCountry\" : \"581218637d21\",\n \"shippingMethod\" : \"3626276f469e\",\n \"shippingAddress\" : {\n \"city\" : \"b66ad98cde2e\",\n \"name\" : \"911fb139856e\",\n \"zip\" : \"bf62046c2dd6\",\n \"state\" : \"65f4323b3165\",\n \"streetLineOne\" : \"d954238ffb56\",\n \"country\" : \"274332af5068\",\n \"streetLineTwo\" : \"376377792a7d\"\n },\n \"signOnDelivery\" : \"f5545b46de52\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"32dd8f7e776c\"\n } ],\n \"ipAddress\" : \"7c8c2b53badb\",\n \"additionalData\" : {\n \"inAuthId\" : \"41aa13e0-ab48-4ded-aee3-ef40e84039b1\"\n }\n}", "mode" : "raw" } }, "name" : "POST /transaction", "description" : { "content" : "Provides decision about a transaction by supplying order or other information" }, "event" : [ { "listen" : "test", "script" : { "exec" : [ "pm.test(\"POST requests should return 2xx\", function () {", " pm.response.to.be.success;", "});" ], "type" : "text/javascript" } } ], "response" : [ { "name" : "Example 200 - Decision", "originalRequest" : { "url" : { "raw" : "{{BASE_URL}}/transaction", "host" : [ "{{BASE_URL}}" ], "path" : [ "transaction" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Provides decision about a transaction by supplying order or other information" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"orderId\" : \"ea9328990772\",\n \"promos\" : [ {\n \"promotionCode\" : \"f6cb5f70fa61\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"f476c71011c9\",\n \"banner\" : \"bay\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"51c23f136ac3\",\n \"billingAddress\" : {\n \"city\" : \"fb88b6f09bca\",\n \"name\" : \"a241953f5948\",\n \"zip\" : \"32e9206803f8\",\n \"state\" : \"742f070605b7\",\n \"streetLineOne\" : \"badc34b046a9\",\n \"country\" : \"7d51b739000a\",\n \"streetLineTwo\" : \"eed37ad19a84\"\n },\n \"transactionNumber\" : \"b5a9870cdce7\",\n \"nameOnCard\" : \"b677866391ea\",\n \"expiryDate\" : \"031e6d9d24ec\",\n \"merchantId\" : 1,\n \"authCode\" : \"64b2319e1ef7\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"21e8e023123e\",\n \"cardType\" : \"b3c5dd2f4104\",\n \"cardNumber\" : \"b23660980a1c\"\n },\n \"customer\" : {\n \"emailAddress\" : \"3acbd29ea42d\",\n \"customerType\" : \"registered\",\n \"accountId\" : \"9bc08f0f0cba\",\n \"lastName\" : \"698690288edd\",\n \"firstName\" : \"7a3420f16060\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"32c4e9e9a387\",\n \"storeNumber\" : 1,\n \"source\" : \"9a0f9854bcd5\",\n \"salesRep\" : \"59ee72e5628f\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"4974daa84e98\",\n \"description\" : \"d4ffb36cfdcd\",\n \"price\" : 1,\n \"svsNumber\" : 1,\n \"upcNumber\" : 1,\n \"department\" : 1,\n \"costAmount\" : 1,\n \"groupNumber\" : 1,\n \"marginAmount\" : 1,\n \"classNumber\" : 1,\n \"color\" : \"a884f9a6f30a\",\n \"shippingCountry\" : \"581218637d21\",\n \"shippingMethod\" : \"3626276f469e\",\n \"shippingAddress\" : {\n \"city\" : \"b66ad98cde2e\",\n \"name\" : \"911fb139856e\",\n \"zip\" : \"bf62046c2dd6\",\n \"state\" : \"65f4323b3165\",\n \"streetLineOne\" : \"d954238ffb56\",\n \"country\" : \"274332af5068\",\n \"streetLineTwo\" : \"376377792a7d\"\n },\n \"signOnDelivery\" : \"f5545b46de52\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"32dd8f7e776c\"\n } ],\n \"ipAddress\" : \"7c8c2b53badb\",\n \"additionalData\" : {\n \"inAuthId\" : \"41aa13e0-ab48-4ded-aee3-ef40e84039b1\"\n }\n}", "mode" : "raw" } }, "body" : "{\n \"crossReference\" : \"b14b99a6-8058-4d68-966e-37900f249657\",\n \"recommendationCode\" : \"reject\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"daaf9628247c\",\n \"remarks\" : \"a99e30ecfca4\",\n \"transactionId\" : \"9c112c6a7571\"\n}", "code" : 200 }, { "name" : "Example 400 - [Error]", "originalRequest" : { "url" : { "raw" : "{{BASE_URL}}/transaction", "host" : [ "{{BASE_URL}}" ], "path" : [ "transaction" ], "query" : [ ], "variable" : [ ] }, "method" : "POST", "description" : { "content" : "Provides decision about a transaction by supplying order or other information" }, "header" : [ { "key" : "Content-Type", "value" : "application/json", "description" : { "content" : "Required to send JSON body" } } ], "body" : { "raw" : "{\n \"orderId\" : \"ea9328990772\",\n \"promos\" : [ {\n \"promotionCode\" : \"f6cb5f70fa61\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"f476c71011c9\",\n \"banner\" : \"bay\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"51c23f136ac3\",\n \"billingAddress\" : {\n \"city\" : \"fb88b6f09bca\",\n \"name\" : \"a241953f5948\",\n \"zip\" : \"32e9206803f8\",\n \"state\" : \"742f070605b7\",\n \"streetLineOne\" : \"badc34b046a9\",\n \"country\" : \"7d51b739000a\",\n \"streetLineTwo\" : \"eed37ad19a84\"\n },\n \"transactionNumber\" : \"b5a9870cdce7\",\n \"nameOnCard\" : \"b677866391ea\",\n \"expiryDate\" : \"031e6d9d24ec\",\n \"merchantId\" : 1,\n \"authCode\" : \"64b2319e1ef7\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"21e8e023123e\",\n \"cardType\" : \"b3c5dd2f4104\",\n \"cardNumber\" : \"b23660980a1c\"\n },\n \"customer\" : {\n \"emailAddress\" : \"3acbd29ea42d\",\n \"customerType\" : \"registered\",\n \"accountId\" : \"9bc08f0f0cba\",\n \"lastName\" : \"698690288edd\",\n \"firstName\" : \"7a3420f16060\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"32c4e9e9a387\",\n \"storeNumber\" : 1,\n \"source\" : \"9a0f9854bcd5\",\n \"salesRep\" : \"59ee72e5628f\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"4974daa84e98\",\n \"description\" : \"d4ffb36cfdcd\",\n \"price\" : 1,\n \"svsNumber\" : 1,\n \"upcNumber\" : 1,\n \"department\" : 1,\n \"costAmount\" : 1,\n \"groupNumber\" : 1,\n \"marginAmount\" : 1,\n \"classNumber\" : 1,\n \"color\" : \"a884f9a6f30a\",\n \"shippingCountry\" : \"581218637d21\",\n \"shippingMethod\" : \"3626276f469e\",\n \"shippingAddress\" : {\n \"city\" : \"b66ad98cde2e\",\n \"name\" : \"911fb139856e\",\n \"zip\" : \"bf62046c2dd6\",\n \"state\" : \"65f4323b3165\",\n \"streetLineOne\" : \"d954238ffb56\",\n \"country\" : \"274332af5068\",\n \"streetLineTwo\" : \"376377792a7d\"\n },\n \"signOnDelivery\" : \"f5545b46de52\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"32dd8f7e776c\"\n } ],\n \"ipAddress\" : \"7c8c2b53badb\",\n \"additionalData\" : {\n \"inAuthId\" : \"41aa13e0-ab48-4ded-aee3-ef40e84039b1\"\n }\n}", "mode" : "raw" } }, "body" : "[ {\n \"message\" : \"Oops, something went wrong!\",\n \"error\" : \"invalid_email\"\n} ]", "code" : 400 } ], "type" : "item" } ], "description" : { "content" : "Store a transaction and give an immediate yes/no/maybe decision, if maybe send to manual review and await other endpoint" }, "type" : "folder" } ], "event" : [ ], "variable" : [ { "key" : "BASE_URL", "value" : "http://fraud-frozone", "type" : "string" } ] }