Skip to content

Commit 8bb5e6d

Browse files
authored
Merge pull request #1271 from maxmind/kevin/key-names
Add non-scalar key values to minfraud response top level field section
2 parents 2fe126f + 1798296 commit 8bb5e6d

File tree

2 files changed

+87
-10
lines changed

2 files changed

+87
-10
lines changed

content/minfraud/api-documentation/responses.md

Lines changed: 83 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,22 @@ For full examples of response bodies, select one of the following:
183183

184184
```json
185185
{
186-
...
187186
"id": "5bc5d6c2-b2c8-40af-87f4-6d61af86b6ae",
188187
"risk_score": 0.01,
189188
"funds_remaining": 25,
190-
"queries_remaining": 5000
191-
...
189+
"queries_remaining": 5000,
190+
"ip_address": {...},
191+
"credit_card": {...},
192+
"device": {...},
193+
"email": {...},
194+
"shipping_address": {...},
195+
"shipping_phone": {...},
196+
"billing_address": {...},
197+
"billing_phone": {...},
198+
"disposition": {...},
199+
"risk_score_reasons": [...],
200+
"subscores": {...},
201+
"warnings": [...]
192202
}
193203
```
194204

@@ -212,6 +222,70 @@ For full examples of response bodies, select one of the following:
212222
The approximate number of queries remaining for the service before your account runs out of funds.
213223
{{</minfraud-schema-row>}}
214224

225+
{{< minfraud-schema-row key="queries_remaining" type="response" valueType="integer" valueTypeNote="min: 0" score="true" insights="true" factors="true" >}}
226+
The approximate number of queries remaining for the service before your account runs out of funds.
227+
{{</minfraud-schema-row>}}
228+
229+
{{< minfraud-schema-row key="ip_address" fragmentOverride="ip-address" type="response" valueType="object" score="true" insights="true" factors="true" >}}
230+
This object contains IP intelligence data.
231+
[See more](#ip-address).
232+
{{</minfraud-schema-row>}}
233+
234+
{{< minfraud-schema-row key="credit_card" fragmentOverride="credit-card" type="response" valueType="object" insights="true" factors="true" >}}
235+
This object contains information related to the credit card.
236+
[See more](#credit-card).
237+
{{</minfraud-schema-row>}}
238+
239+
{{< minfraud-schema-row key="device" fragmentOverride="device" type="response" valueType="object" insights="true" factors="true" >}}
240+
This object contains information about the device that MaxMind believes is associated with the IP address passed in the request.
241+
[See more](#device).
242+
{{</minfraud-schema-row>}}
243+
244+
{{< minfraud-schema-row key="email" fragmentOverride="email" type="response" valueType="object" insights="true" factors="true" >}}
245+
This object contains email intelligence data.
246+
[See more](#email).
247+
{{</minfraud-schema-row>}}
248+
249+
{{< minfraud-schema-row key="shipping_address" fragmentOverride="shipping-address" type="response" valueType="object" insights="true" factors="true" >}}
250+
This object contains information related to the shipping address
251+
[See more](#shipping-address).
252+
{{</minfraud-schema-row>}}
253+
254+
{{< minfraud-schema-row key="shipping_phone" fragmentOverride="shipping-phone" type="response" valueType="object" insights="true" factors="true" >}}
255+
This object contains information related to the shipping phone number
256+
[See more](#shipping-phone).
257+
{{</minfraud-schema-row>}}
258+
259+
{{< minfraud-schema-row key="billing_address" fragmentOverride="billing-address" type="response" valueType="object" insights="true" factors="true" >}}
260+
This object contains information related to the billing address
261+
[See more](#billing-address).
262+
{{</minfraud-schema-row>}}
263+
264+
{{< minfraud-schema-row key="billing_phone" fragmentOverride="billing-phone" type="response" valueType="object" insights="true" factors="true" >}}
265+
This object contains information related to the billing phone number
266+
[See more](#billing-phone).
267+
{{</minfraud-schema-row>}}
268+
269+
{{< minfraud-schema-row key="disposition" fragmentOverride="disposition" type="response" valueType="object" score="true" insights="true" factors="true" >}}
270+
This object contains information about how a request was handled by the custom rules that you have defined.
271+
[See more](#disposition).
272+
{{</minfraud-schema-row>}}
273+
274+
{{< minfraud-schema-row key="risk_score_reasons" fragmentOverride="risk-score-reasons" type="response" valueType="array" factors="true" >}}
275+
This array contains risk score reason objects.
276+
[See more](#risk-score-reasons).
277+
{{</minfraud-schema-row>}}
278+
279+
{{< minfraud-schema-row key="subscores" fragmentOverride="subscores" type="response" valueType="object" factors="true" >}}
280+
**Deprecated.** This object contains risk factor scores for many of the individual components that are used in calculating the risk_score.
281+
[See more](#subscores).
282+
{{</minfraud-schema-row>}}
283+
284+
{{< minfraud-schema-row key="warnings" fragmentOverride="warnings" type="response" valueType="array" score="true" insights="true" factors="true" >}}
285+
This array contains warning objects detailing issues with the request that was sent, such as invalid or unknown inputs.
286+
[See more](#warnings).
287+
{{</minfraud-schema-row>}}
288+
215289
{{</ schema-table >}}
216290

217291
### IP Address
@@ -995,9 +1069,9 @@ will not be present in the response.
9951069
A machine-readable code identifying the risk reason. Examples listed below. Although more codes may be added in the future, a list of current codes may be provided on request.
9961070
| Code |
9971071
| --------------- |
998-
| ANONYMOUS\_IP |
999-
| COUNTRY |
1000-
| ORG\_DISTANCE\_RISK |
1072+
| ANONYMOUS\_IP |
1073+
| COUNTRY |
1074+
| ORG\_DISTANCE\_RISK |
10011075
{{</minfraud-schema-row>}}
10021076

10031077
{{< minfraud-schema-row key="reason" type="response" valueType="string" factors="true" >}}
@@ -1015,9 +1089,9 @@ will not be present in the response.
10151089
{{< anchor-target schema--response--subscores >}}
10161090

10171091
{{< alert warning >}}
1018-
Risk factor scores are deprecated as of November 4, 2024. Please
1019-
[review risk score reasons](/minfraud/api-documentation/responses/#risk-score-reasons)
1020-
for insight into why a risk score is high or low.
1092+
Risk factor scores are deprecated as of November 4, 2024. Please
1093+
[review risk score reasons](/minfraud/api-documentation/responses/#risk-score-reasons)
1094+
for insight into why a risk score is high or low.
10211095

10221096
{{</ alert >}}
10231097

layouts/shortcodes/minfraud-schema-row.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
{{ $key := .Get "key" }}
44
{{ $type := .Get "type" }}
55
{{ $fragment := printf "schema--%s--%s__%s" $type $parentKey $key }}
6+
{{ $fragmentOverride := .Get "fragmentOverride" }}
7+
{{ $href := $fragment }}
8+
{{ if $fragmentOverride }}{{ $href = $fragmentOverride }}{{ end }}
69

710
{{ $score := .Get "score" }}
811
{{ $insights := .Get "insights" }}
@@ -14,7 +17,7 @@
1417

1518
<tr>
1619
<td class="schema__key-cell">
17-
<a href="#{{ $fragment }}"><code class="schema__row-key">{{ $key }}</code></a>
20+
<a href="#{{ $href }}"><code class="schema__row-key">{{ $key }}</code></a>
1821
</td>
1922
<td class="schema__type-cell">
2023
{{ .Get "valueType" }}

0 commit comments

Comments
 (0)