{ "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.2" }, "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\" : \"186afd06-17fd-4422-98ec-9f15f05d42a9\",\n \"recommendationCode\" : \"review\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"e5f556ea19ba\",\n \"remarks\" : \"166c7e734f5a\",\n \"transactionId\" : \"8e419bca5950\"\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\" : \"186afd06-17fd-4422-98ec-9f15f05d42a9\",\n \"recommendationCode\" : \"review\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"e5f556ea19ba\",\n \"remarks\" : \"166c7e734f5a\",\n \"transactionId\" : \"8e419bca5950\"\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\" : \"186afd06-17fd-4422-98ec-9f15f05d42a9\",\n \"recommendationCode\" : \"review\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"e5f556ea19ba\",\n \"remarks\" : \"166c7e734f5a\",\n \"transactionId\" : \"8e419bca5950\"\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\" : \"424b5dbd3257\",\n \"promos\" : [ {\n \"promotionCode\" : \"5f6c4237038d\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"fd915cf8b001\",\n \"banner\" : \"s5a\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"b31f68d5c836\",\n \"billingAddress\" : {\n \"city\" : \"f3edea9b71de\",\n \"name\" : \"6a03d3f01c14\",\n \"zip\" : \"eef445d8a8da\",\n \"state\" : \"18ba83aee069\",\n \"streetLineOne\" : \"24b9fee4c46e\",\n \"country\" : \"904d3f7d4626\",\n \"streetLineTwo\" : \"9820fe07117c\"\n },\n \"transactionNumber\" : \"b4f353105094\",\n \"nameOnCard\" : \"66a313127dc7\",\n \"expiryDate\" : \"d14b50c7a704\",\n \"merchantId\" : 1,\n \"authCode\" : \"bcd6d1390f01\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"d79870d5c0e9\",\n \"cardType\" : \"32f4cc94021e\",\n \"cardNumber\" : \"099c028eb639\"\n },\n \"customer\" : {\n \"emailAddress\" : \"75ace6d825f9\",\n \"customerType\" : \"employee\",\n \"accountId\" : \"8921064c30d6\",\n \"lastName\" : \"d3a3263bdb68\",\n \"firstName\" : \"0cb0b7c1cb53\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"65f507a87a9a\",\n \"storeNumber\" : 1,\n \"source\" : \"951b3cf622e5\",\n \"salesRep\" : \"666138f8b7d1\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"64ccf88369cf\",\n \"description\" : \"bfeedb4bec5e\",\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\" : \"b737fac02ce4\",\n \"shippingCountry\" : \"181b4109e55f\",\n \"shippingMethod\" : \"c4e8bd56a0f1\",\n \"shippingAddress\" : {\n \"city\" : \"0b0d8ed4e14d\",\n \"name\" : \"71b40a525b95\",\n \"zip\" : \"688332d0bb26\",\n \"state\" : \"c2d37d7b54e4\",\n \"streetLineOne\" : \"e9d6137d0f2d\",\n \"country\" : \"b5a24f676090\",\n \"streetLineTwo\" : \"955e1f90abac\"\n },\n \"signOnDelivery\" : \"cebe220b54a3\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"704b7f8ea15e\"\n } ],\n \"ipAddress\" : \"463cd562e9c7\",\n \"additionalData\" : {\n \"inAuthId\" : \"6f0748fd-8675-46c4-80e3-d4bb6e6dd27f\"\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\" : \"424b5dbd3257\",\n \"promos\" : [ {\n \"promotionCode\" : \"5f6c4237038d\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"fd915cf8b001\",\n \"banner\" : \"s5a\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"b31f68d5c836\",\n \"billingAddress\" : {\n \"city\" : \"f3edea9b71de\",\n \"name\" : \"6a03d3f01c14\",\n \"zip\" : \"eef445d8a8da\",\n \"state\" : \"18ba83aee069\",\n \"streetLineOne\" : \"24b9fee4c46e\",\n \"country\" : \"904d3f7d4626\",\n \"streetLineTwo\" : \"9820fe07117c\"\n },\n \"transactionNumber\" : \"b4f353105094\",\n \"nameOnCard\" : \"66a313127dc7\",\n \"expiryDate\" : \"d14b50c7a704\",\n \"merchantId\" : 1,\n \"authCode\" : \"bcd6d1390f01\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"d79870d5c0e9\",\n \"cardType\" : \"32f4cc94021e\",\n \"cardNumber\" : \"099c028eb639\"\n },\n \"customer\" : {\n \"emailAddress\" : \"75ace6d825f9\",\n \"customerType\" : \"employee\",\n \"accountId\" : \"8921064c30d6\",\n \"lastName\" : \"d3a3263bdb68\",\n \"firstName\" : \"0cb0b7c1cb53\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"65f507a87a9a\",\n \"storeNumber\" : 1,\n \"source\" : \"951b3cf622e5\",\n \"salesRep\" : \"666138f8b7d1\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"64ccf88369cf\",\n \"description\" : \"bfeedb4bec5e\",\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\" : \"b737fac02ce4\",\n \"shippingCountry\" : \"181b4109e55f\",\n \"shippingMethod\" : \"c4e8bd56a0f1\",\n \"shippingAddress\" : {\n \"city\" : \"0b0d8ed4e14d\",\n \"name\" : \"71b40a525b95\",\n \"zip\" : \"688332d0bb26\",\n \"state\" : \"c2d37d7b54e4\",\n \"streetLineOne\" : \"e9d6137d0f2d\",\n \"country\" : \"b5a24f676090\",\n \"streetLineTwo\" : \"955e1f90abac\"\n },\n \"signOnDelivery\" : \"cebe220b54a3\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"704b7f8ea15e\"\n } ],\n \"ipAddress\" : \"463cd562e9c7\",\n \"additionalData\" : {\n \"inAuthId\" : \"6f0748fd-8675-46c4-80e3-d4bb6e6dd27f\"\n }\n}", "mode" : "raw" } }, "body" : "{\n \"crossReference\" : \"b6b3aed9-7296-42af-ac75-5524b7b06cb5\",\n \"recommendationCode\" : \"accept\",\n \"totalScore\" : 1,\n \"rulesTripped\" : \"3b5cb0c09f48\",\n \"remarks\" : \"a048eea730f7\",\n \"transactionId\" : \"e009f46579bc\"\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\" : \"424b5dbd3257\",\n \"promos\" : [ {\n \"promotionCode\" : \"5f6c4237038d\",\n \"promotionAmount\" : 1\n } ],\n \"shippingCost\" : 1,\n \"groupId\" : \"fd915cf8b001\",\n \"banner\" : \"s5a\",\n \"orderTotal\" : 1,\n \"creditCard\" : {\n \"responseCode\" : 1,\n \"registerNumber\" : \"b31f68d5c836\",\n \"billingAddress\" : {\n \"city\" : \"f3edea9b71de\",\n \"name\" : \"6a03d3f01c14\",\n \"zip\" : \"eef445d8a8da\",\n \"state\" : \"18ba83aee069\",\n \"streetLineOne\" : \"24b9fee4c46e\",\n \"country\" : \"904d3f7d4626\",\n \"streetLineTwo\" : \"9820fe07117c\"\n },\n \"transactionNumber\" : \"b4f353105094\",\n \"nameOnCard\" : \"66a313127dc7\",\n \"expiryDate\" : \"d14b50c7a704\",\n \"merchantId\" : 1,\n \"authCode\" : \"bcd6d1390f01\",\n \"fullAmount\" : 1,\n \"authorizedAmount\" : 1,\n \"avsResponse\" : \"d79870d5c0e9\",\n \"cardType\" : \"32f4cc94021e\",\n \"cardNumber\" : \"099c028eb639\"\n },\n \"customer\" : {\n \"emailAddress\" : \"75ace6d825f9\",\n \"customerType\" : \"employee\",\n \"accountId\" : \"8921064c30d6\",\n \"lastName\" : \"d3a3263bdb68\",\n \"firstName\" : \"0cb0b7c1cb53\",\n \"creationDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\"\n },\n \"currencyCode\" : \"65f507a87a9a\",\n \"storeNumber\" : 1,\n \"source\" : \"951b3cf622e5\",\n \"salesRep\" : \"666138f8b7d1\",\n \"lastModifiedDate\" : \"Property[year]-Property[monthOfYear]-Property[dayOfMonth]\",\n \"items\" : [ {\n \"quantity\" : 1,\n \"giftWrapped\" : true,\n \"size\" : \"64ccf88369cf\",\n \"description\" : \"bfeedb4bec5e\",\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\" : \"b737fac02ce4\",\n \"shippingCountry\" : \"181b4109e55f\",\n \"shippingMethod\" : \"c4e8bd56a0f1\",\n \"shippingAddress\" : {\n \"city\" : \"0b0d8ed4e14d\",\n \"name\" : \"71b40a525b95\",\n \"zip\" : \"688332d0bb26\",\n \"state\" : \"c2d37d7b54e4\",\n \"streetLineOne\" : \"e9d6137d0f2d\",\n \"country\" : \"b5a24f676090\",\n \"streetLineTwo\" : \"955e1f90abac\"\n },\n \"signOnDelivery\" : \"cebe220b54a3\",\n \"extendedPrice\" : 1,\n \"skuNumber\" : 1,\n \"currentStatus\" : \"704b7f8ea15e\"\n } ],\n \"ipAddress\" : \"463cd562e9c7\",\n \"additionalData\" : {\n \"inAuthId\" : \"6f0748fd-8675-46c4-80e3-d4bb6e6dd27f\"\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" } ] }