Skip to content

Commit 88bd9be

Browse files
committed
docs: update API specs to match current backend behavior
- Batch contribution limit: 500 → 5000 - Size parameter default: 50 → all (no limit) - Remove self-only param, use fetch-mode (DEFAULT/OLD/NEW/SELF) - Add confidence-score param to retrieval examples - Fix submit tutorial: remove response-only fields from input structure - Add email and URL to supported fraud identifier types
1 parent 61c2827 commit 88bd9be

4 files changed

Lines changed: 12 additions & 25 deletions

File tree

src/api-specification/contribution-controller/assembling-a-contribution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For a detailed breakdown of every field and value in the body of a request, see
5959

6060
::: tip NOTE
6161

62-
This endpoint accepts requests with up to `500` entries.
62+
This endpoint accepts requests with up to `5000` entries.
6363

6464
:::
6565

src/api-specification/contribution-controller/retrieving-contributions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following parameters can be specified with the request to filter the retriev
1919

2020
| Field | Value Type | Description |
2121
| :-: | --- | --- |
22-
| `size` | `integer($int32)` | The number of entries, starting with the latest, shown in the response. <br> Set to `50` by default. |
22+
| `size` | `integer($int32)` | The number of entries, starting with the latest, shown in the response. <br> If not specified, all available contributions are returned. |
2323
| `from` and `to` | `string` | The timeframe that the response entries are filtered by. Both are set as an exact time and date (ISO 8601: `YYYY-MM-DDTHH:MM:SSZ`). <br> If the `from` parameter is left unspecified, the results will be fetched since the establishment of the FIB network. <br> If the `to` parameter is left unspecified, the results will be fetched until the latest uploaded contribution. |
2424
| `ft` | `array[string]` | The [type of the fraud event](../../overview/fraud-events.md#types-of-fraud-events). <br> Can be one of the following: <ol><li>`Wangiri`</li><li>`IRSF`</li><li>`StolenDevice`</li><li>`IPFraud`</li><li>`SMSA2P`</li><li>`FlashCall`</li><li>`Scam`</li></ol> |
2525
| `org` | `array[string]` | The country of origination of the fraud event. Set as a two-letter country code (Alpha-2, ISO 3166; e.g., US, GA). |

src/tutorials-api/retrieving-contributions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To retrieve contributions, send the following request:
1919
::: code-group Data structure
2020

2121
```http [Input structure]
22-
GET /api/v1/contribution-management/contribution?size=''&from=''&to=''&ft=''&org=''&self-only=''
22+
GET /api/v1/contribution-management/contribution?size=''&from=''&to=''&ft=''&org=''&dst=''&fetch-mode=''&confidence-score=''
2323
```
2424

2525
```http [Input examples]
@@ -38,14 +38,14 @@ GET /api/v1/contribution-management/contribution?size=''&from=''&to=''&ft=''&org
3838
// dst
3939
/api/v1/contribution-management/contribution?dst=GA
4040
41-
// self-only
42-
/api/v1/contribution-management/contribution?self-only=true
43-
4441
// fetch-mode
45-
/api/v1/contribution-management/contribution?fetch-mode=new
42+
/api/v1/contribution-management/contribution?fetch-mode=NEW
43+
44+
// confidence-score
45+
/api/v1/contribution-management/contribution?confidence-score=true
4646
4747
// combination
48-
/api/v1/contribution-management/contribution?size=2&ft=StolenDevice&org=US&self-only=true&fetch-mode=new
48+
/api/v1/contribution-management/contribution?size=2&ft=StolenDevice&org=US&fetch-mode=NEW&confidence-score=true
4949
```
5050

5151
:::
@@ -66,7 +66,7 @@ The response to the `GET` request contains a list of the contributions, filtered
6666
data: {
6767
contributions: [
6868
{
69-
id: 'string', //127.0.0.1 OR 127.0.0.1-127.0.0.2 OR +14155552671 OR +14155552671-+14155552672 OR 107615702016566
69+
id: 'string', //127.0.0.1 OR 127.0.0.1-127.0.0.2 OR +14155552671 OR +14155552671-+14155552672 OR 107615702016566 OR address@mail.com OR https://www.address.com/
7070
fraudType: 'string',
7171
origination: 'string',
7272
destination: 'string',

src/tutorials-api/submitting-a-contribution.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@ To submit a contribution, perform the following steps:
1919
```json5 [Input structure]
2020
[
2121
{
22-
id: 'string', //127.0.0.1 OR 127.0.0.1-127.0.0.2 OR +14155552671 OR +14155552671-+14155552672 OR 107615702016566
22+
id: 'string', //127.0.0.1 OR 127.0.0.1-127.0.0.2 OR +14155552671 OR +14155552671-+14155552672 OR 107615702016566 OR address@mail.com OR https://www.address.com/
2323
fraudType: 'string',
2424
origination: 'string',
2525
destination: 'string',
26-
expiryDate: integer($int32),
27-
fraudStatus: "string(enum)", //'ACTIVE' OR 'EXPIRED' OR 'FLAGGED'
28-
confidenceIndex: number($double),
29-
isPrivileged: boolean,
30-
peerId: 'string',
31-
flagger: 'string',
32-
timestamp: integer($int32)
26+
sourcePeerId: 'string' // optional — registered peer identifier
3327
}
3428
]
3529
```
@@ -40,14 +34,7 @@ To submit a contribution, perform the following steps:
4034
id: '129.0.0.1',
4135
fraudType: 'IPFraud',
4236
origination: 'SE',
43-
destination: 'GB',
44-
expiryDate: 1719068894,
45-
fraudStatus: 'Active',
46-
confidenceIndex: 100,
47-
isPrivileged: true,
48-
peerId: 'wonderland',
49-
flagger: 'alice@wonderland',
50-
timestamp: 2024-08-30T17:07:33Z
37+
destination: 'GB'
5138
}
5239
]
5340
```

0 commit comments

Comments
 (0)