Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 044453f

Browse files
author
nobody
committed
JSON Schema Update
1 parent e9f34bd commit 044453f

File tree

9 files changed

+249
-0
lines changed

9 files changed

+249
-0
lines changed

config/v3/p2p_advert_create/receive.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@
211211
"string"
212212
]
213213
},
214+
"eligible_countries": {
215+
"description": "2 letter country codes. Counterparties who do not live in these countries are not allowed to place orders against this advert.",
216+
"type": "array",
217+
"items": {
218+
"type": "string"
219+
}
220+
},
214221
"id": {
215222
"description": "The unique identifier for this advert.",
216223
"type": "string"
@@ -256,6 +263,14 @@
256263
"description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
257264
"type": "string"
258265
},
266+
"min_completion_rate": {
267+
"description": "Counterparties who have a 30 day completion rate less than this value are not allowed to place orders against this advert.",
268+
"type": "number"
269+
},
270+
"min_join_days": {
271+
"description": "Counterparties who joined less than this number of days ago are not allowed to place orders against this advert.",
272+
"type": "integer"
273+
},
259274
"min_order_amount": {
260275
"description": "Minimum order amount specified in advert, in `account_currency`.",
261276
"type": "number"
@@ -272,6 +287,10 @@
272287
"description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
273288
"type": "string"
274289
},
290+
"min_rating": {
291+
"description": "Counterparties who have an average rating less than this value are not allowed to place orders against this advert.",
292+
"type": "number"
293+
},
275294
"order_expiry_period": {
276295
"description": "Expiry period (seconds) for order created against this ad.",
277296
"type": "integer",

config/v3/p2p_advert_create/send.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
"pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$",
5252
"sensitive": 1
5353
},
54+
"eligible_countries": {
55+
"description": "[Optional] 2 letter country codes. Counterparties who do not live in these countries will not be allowed to place orders against the advert.",
56+
"type": "array",
57+
"items": {
58+
"type": "string",
59+
"pattern": "^[a-z]{2}$"
60+
},
61+
"maxItems": 250,
62+
"uniqueItems": true
63+
},
5464
"local_currency": {
5565
"description": "[Optional] Local currency for this advert. If not provided, will use the currency of client's residence by default.",
5666
"type": "string",
@@ -65,12 +75,30 @@
6575
"exclusiveMinimum": true,
6676
"minimum": 0
6777
},
78+
"min_completion_rate": {
79+
"description": "[Optional] Counterparties who have a 30 day completion rate less than this value will not be allowed to place orders against the advert.",
80+
"type": "number",
81+
"maximum": 100,
82+
"minimum": 0
83+
},
84+
"min_join_days": {
85+
"description": "[Optional] Counterparties who joined less than this number of days ago will not be allowed to place orders against the advert.",
86+
"type": "integer",
87+
"maximum": 999,
88+
"minimum": 0
89+
},
6890
"min_order_amount": {
6991
"description": "Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.",
7092
"type": "number",
7193
"exclusiveMinimum": true,
7294
"minimum": 0
7395
},
96+
"min_rating": {
97+
"description": "[Optional] Counterparties who have an average rating less than this value will not be allowed to place orders against the advert.",
98+
"type": "number",
99+
"maximum": 5,
100+
"minimum": 1
101+
},
74102
"order_expiry_period": {
75103
"description": "[Optional] Expiry period (seconds) for order created against this ad.",
76104
"type": "integer",

config/v3/p2p_advert_info/receive.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,26 @@
214214
"string"
215215
]
216216
},
217+
"eligibility_status": {
218+
"description": "Reasons why the counterparty terms do not allow the current user to place orders against this advert. Possible values: \n- `completion_rate`: current user's 30 day completion rate is less than `min_completion_rate`. \n- `country`: current user's residence is not in `eligible_countries`. \n- `join_date`: current user registered on P2P less than `min_join_days` in the past. \n- `rating`: current user's average review rating is less than `min_rating`.",
219+
"type": "array",
220+
"items": {
221+
"type": "string",
222+
"enum": [
223+
"completion_rate",
224+
"country",
225+
"join_date",
226+
"rating_average"
227+
]
228+
}
229+
},
230+
"eligible_countries": {
231+
"description": "2 letter country codes. Counterparties who do not live in these countries are not allowed to place orders against this advert.",
232+
"type": "array",
233+
"items": {
234+
"type": "string"
235+
}
236+
},
217237
"id": {
218238
"description": "The unique identifier for this advert.",
219239
"type": "string"
@@ -226,6 +246,15 @@
226246
1
227247
]
228248
},
249+
"is_eligible": {
250+
"description": "Indicates that the current user meets the counterparty terms for placing orders against this advert.",
251+
"type": "integer",
252+
"default": 0,
253+
"enum": [
254+
0,
255+
1
256+
]
257+
},
229258
"is_visible": {
230259
"description": "Indicates that this advert will appear on the main advert list. It is only visible to the advert owner.",
231260
"type": "integer",
@@ -259,6 +288,14 @@
259288
"description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
260289
"type": "string"
261290
},
291+
"min_completion_rate": {
292+
"description": "Counterparties who have a 30 day completion rate less than this value are not allowed to place orders against this advert.",
293+
"type": "number"
294+
},
295+
"min_join_days": {
296+
"description": "Counterparties who joined less than this number of days ago are not allowed to place orders against this advert.",
297+
"type": "integer"
298+
},
262299
"min_order_amount": {
263300
"description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.",
264301
"type": "number"
@@ -275,6 +312,10 @@
275312
"description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
276313
"type": "string"
277314
},
315+
"min_rating": {
316+
"description": "Counterparties who have an average rating less than this value are not allowed to place orders against this advert.",
317+
"type": "number"
318+
},
278319
"order_expiry_period": {
279320
"description": "Expiry period (seconds) for order created against this ad.",
280321
"type": "integer",

config/v3/p2p_advert_list/receive.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,26 @@
243243
"string"
244244
]
245245
},
246+
"eligibility_status": {
247+
"description": "Reasons why the counterparty terms do not allow the current user to place orders against this advert. Possible values: \n- `completion_rate`: current user's 30 day completion rate is less than `min_completion_rate`. \n- `country`: current user's residence is not in `eligible_countries`. \n- `join_date`: current user registered on P2P less than `min_join_days` in the past. \n- `rating`: current user's average review rating is less than `min_rating`.",
248+
"type": "array",
249+
"items": {
250+
"type": "string",
251+
"enum": [
252+
"completion_rate",
253+
"country",
254+
"join_date",
255+
"rating_average"
256+
]
257+
}
258+
},
259+
"eligible_countries": {
260+
"description": "2 letter country codes. Counterparties who do not live in these countries are not allowed to place orders against this advert.",
261+
"type": "array",
262+
"items": {
263+
"type": "string"
264+
}
265+
},
246266
"id": {
247267
"description": "The unique identifier for this advert.",
248268
"type": "string"
@@ -255,6 +275,15 @@
255275
1
256276
]
257277
},
278+
"is_eligible": {
279+
"description": "Indicates that the current user meets the counterparty terms for placing an order.",
280+
"type": "integer",
281+
"default": 0,
282+
"enum": [
283+
0,
284+
1
285+
]
286+
},
258287
"is_visible": {
259288
"description": "Indicates that this advert will appear on the main advert list.",
260289
"type": "integer",
@@ -288,6 +317,14 @@
288317
"description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
289318
"type": "string"
290319
},
320+
"min_completion_rate": {
321+
"description": "Counterparties who have a 30 day completion rate less than this value are not allowed to place orders against this advert.",
322+
"type": "number"
323+
},
324+
"min_join_days": {
325+
"description": "Counterparties who joined less than this number of days ago are not allowed to place orders against this advert.",
326+
"type": "integer"
327+
},
291328
"min_order_amount": {
292329
"description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.",
293330
"type": "number"
@@ -304,6 +341,10 @@
304341
"description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
305342
"type": "string"
306343
},
344+
"min_rating": {
345+
"description": "Counterparties who have an average rating less than this value are not allowed to place orders against this advert.",
346+
"type": "number"
347+
},
307348
"order_expiry_period": {
308349
"description": "Expiry period (seconds) for order created against this ad.",
309350
"type": "integer",

config/v3/p2p_advert_list/send.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@
5757
1
5858
]
5959
},
60+
"hide_ineligible": {
61+
"description": "[Optional] If set to 1, adverts for which the current user does not meet counteryparty terms are not returned.",
62+
"type": "integer",
63+
"default": 0,
64+
"enum": [
65+
0,
66+
1
67+
]
68+
},
6069
"limit": {
6170
"description": "[Optional] Used for paging.",
6271
"type": "integer",

config/v3/p2p_advert_update/receive.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@
189189
"string"
190190
]
191191
},
192+
"eligible_countries": {
193+
"description": "2 letter country codes. Counterparties who do not live in these countries are not allowed to place orders against this advert",
194+
"type": "array",
195+
"items": {
196+
"type": "string"
197+
}
198+
},
192199
"id": {
193200
"description": "The unique identifier for this advert.",
194201
"type": "string"
@@ -234,6 +241,14 @@
234241
"description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
235242
"type": "string"
236243
},
244+
"min_completion_rate": {
245+
"description": "Counterparties who have a 30 day completion rate less than this value are not allowed to place orders against this advert.",
246+
"type": "number"
247+
},
248+
"min_join_days": {
249+
"description": "Counterparties who joined less than this number of days ago are not allowed to place orders against this advert.",
250+
"type": "integer"
251+
},
237252
"min_order_amount": {
238253
"description": "Minimum order amount specified in advert, in `account_currency`. It is only visible to the advert owner.",
239254
"type": "number"
@@ -250,6 +265,10 @@
250265
"description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
251266
"type": "string"
252267
},
268+
"min_rating": {
269+
"description": "Counterparties who have an average rating less than this value are not allowed to place orders against this advert.",
270+
"type": "number"
271+
},
253272
"order_expiry_period": {
254273
"description": "Expiry period (seconds) for order created against this ad.",
255274
"type": "integer",

config/v3/p2p_advert_update/send.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@
4040
"pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$",
4141
"sensitive": 1
4242
},
43+
"eligible_countries": {
44+
"description": "[Optional] 2 letter country codes. Counterparties who do not live in these countries will not be allowed to place orders against this advert. An empty array or null value will clear the condition.",
45+
"type": [
46+
"array",
47+
"null"
48+
],
49+
"items": {
50+
"type": "string",
51+
"pattern": "^[a-z]{2}$"
52+
},
53+
"maxItems": 250,
54+
"uniqueItems": true
55+
},
4356
"id": {
4457
"description": "The unique identifier for this advert.",
4558
"type": "string",
@@ -67,12 +80,39 @@
6780
"exclusiveMinimum": true,
6881
"minimum": 0
6982
},
83+
"min_completion_rate": {
84+
"description": "[Optional] Counterparties who have a 30 day completion rate less than this value will not be allowed to place orders against this advert. A an empty array or null value will clear the condition.",
85+
"type": [
86+
"null",
87+
"number"
88+
],
89+
"maximum": 100,
90+
"minimum": 0
91+
},
92+
"min_join_days": {
93+
"description": "[Optional] Counterparties who joined less than this number of days ago will not be allowed to place orders against this advert. A null value will clear the condition.",
94+
"type": [
95+
"integer",
96+
"null"
97+
],
98+
"maximum": 999,
99+
"minimum": 0
100+
},
70101
"min_order_amount": {
71102
"description": "[Optional] Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.",
72103
"type": "number",
73104
"exclusiveMinimum": true,
74105
"minimum": 0
75106
},
107+
"min_rating": {
108+
"description": "[Optional] Counterparties who have an average rating less than this value will not be allowed to place orders against this advert. A null value will clear the condition.",
109+
"type": [
110+
"null",
111+
"number"
112+
],
113+
"maximum": 5,
114+
"minimum": 1
115+
},
76116
"order_expiry_period": {
77117
"description": "[Optional] Expiry period (seconds) for order created against this ad.",
78118
"type": "integer",

config/v3/p2p_advertiser_adverts/receive.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@
227227
"string"
228228
]
229229
},
230+
"eligible_countries": {
231+
"description": "2 letter country codes. Counterparties who do not live in these countries are not allowed to place orders.",
232+
"type": "array",
233+
"items": {
234+
"type": "string"
235+
}
236+
},
230237
"id": {
231238
"description": "The unique identifier for this advert.",
232239
"type": "string"
@@ -272,6 +279,14 @@
272279
"description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
273280
"type": "string"
274281
},
282+
"min_completion_rate": {
283+
"description": "Counterparties who have a 30 day completion rate less than this value are not allowed to place orders.",
284+
"type": "number"
285+
},
286+
"min_join_days": {
287+
"description": "Counterparties who joined less than this number of days ago are not allowed to place orders.",
288+
"type": "integer"
289+
},
275290
"min_order_amount": {
276291
"description": "Minimum order amount, in `account_currency`.",
277292
"type": "number"
@@ -288,6 +303,10 @@
288303
"description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.",
289304
"type": "string"
290305
},
306+
"min_rating": {
307+
"description": "Counterparties who have an average rating less than this value are not allowed to place orders.",
308+
"type": "number"
309+
},
291310
"order_expiry_period": {
292311
"description": "Expiry period (seconds) for order created against this ad.",
293312
"type": "integer",

0 commit comments

Comments
 (0)