Skip to content

Commit 4965df8

Browse files
author
nobody
committed
JSON Schema Update
1 parent 171e37c commit 4965df8

File tree

7 files changed

+457
-0
lines changed

7 files changed

+457
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"partner_account_creation": 1,
3+
"account_type": "demo",
4+
"address_city": "Melbourne",
5+
"address_line_1": "20 Broadway Av",
6+
"address_line_2": "East Melbourne VIC",
7+
"address_postcode": "3002",
8+
"address_state": "Victoria",
9+
"calling_country_code": 971,
10+
"citizen": "au",
11+
"company_name": "Deriv Limited",
12+
"currency": "USD",
13+
"date_of_birth": "1980-01-31",
14+
"email": "[email protected]",
15+
"first_name": "Peter",
16+
"last_name": "Pan",
17+
"partner_type": "individual",
18+
"phone": "23456789",
19+
"provider": "myaffiliate",
20+
"residence": "au",
21+
"salutation": "Mr",
22+
"tnc_acceptance": 1,
23+
"website": "xyz.com"
24+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Partner Account Creation (response)",
4+
"description": "Create partner accounts - Receive",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"partner_account_creation": {
12+
"title": "partner_account_creation",
13+
"description": "New partner account creation details for real partner wallet",
14+
"type": "object",
15+
"additionalProperties": false,
16+
"properties": {
17+
"client_id": {
18+
"description": "Client ID of new real partner account",
19+
"type": "string"
20+
},
21+
"currency": {
22+
"description": "Currency of an account",
23+
"type": "string"
24+
},
25+
"currency_type": {
26+
"description": "Currency type against the currency",
27+
"type": "string"
28+
},
29+
"landing_company": {
30+
"description": "Landing company full name",
31+
"type": "string"
32+
},
33+
"landing_company_shortcode": {
34+
"description": "Landing company shortcode",
35+
"type": "string"
36+
},
37+
"oauth_token": {
38+
"description": "OAuth token for client's login session",
39+
"type": "string"
40+
}
41+
}
42+
},
43+
"echo_req": {
44+
"description": "Echo of the request made.",
45+
"type": "object"
46+
},
47+
"msg_type": {
48+
"description": "Action name of the request made.",
49+
"type": "string",
50+
"enum": [
51+
"partner_account_creation"
52+
]
53+
},
54+
"req_id": {
55+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
56+
"type": "integer"
57+
}
58+
}
59+
}
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Partner Account Creation (request)",
4+
"description": "This call initiates the state machine for account creation process",
5+
"type": "object",
6+
"auth_required": 1,
7+
"auth_scopes": [
8+
"admin"
9+
],
10+
"additionalProperties": false,
11+
"required": [
12+
"partner_account_creation",
13+
"salutation"
14+
],
15+
"properties": {
16+
"partner_account_creation": {
17+
"description": "Must be `1`",
18+
"type": "integer",
19+
"enum": [
20+
1
21+
]
22+
},
23+
"account_type": {
24+
"description": "Account type. If set to 'financial', setting 'mt5_account_type' is also required.",
25+
"type": "string",
26+
"enum": [
27+
"demo",
28+
"gaming",
29+
"financial",
30+
"all"
31+
]
32+
},
33+
"address_city": {
34+
"description": "[Optional] Within 100 characters.",
35+
"type": "string",
36+
"pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$"
37+
},
38+
"address_line_1": {
39+
"description": "Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-",
40+
"type": "string",
41+
"pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,69}$"
42+
},
43+
"address_line_2": {
44+
"description": "[Optional] Within 70 characters.",
45+
"type": "string",
46+
"pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$"
47+
},
48+
"address_postcode": {
49+
"description": "[Optional] Within 20 characters and may not contain '+'.",
50+
"type": "string",
51+
"pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$"
52+
},
53+
"address_state": {
54+
"description": "[Optional] Possible value receive from `states_list` call.",
55+
"type": "string",
56+
"pattern": "^[\\p{L}\\p{Nd}\\s'.,-]{0,100}$"
57+
},
58+
"calling_country_code": {
59+
"description": "[Optional] The phone's calling country code.",
60+
"type": [
61+
"null",
62+
"string"
63+
],
64+
"sensitive": 1
65+
},
66+
"citizen": {
67+
"description": "[Optional] Country of legal citizenship, 2-letter country code.",
68+
"type": [
69+
"null",
70+
"string"
71+
],
72+
"pattern": "^([a-z]{2})?$"
73+
},
74+
"company_name": {
75+
"description": "[Optional] Company name. Only applicable for partners of type company.",
76+
"type": "string",
77+
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$",
78+
"sensitive": 1
79+
},
80+
"company_registration_no": {
81+
"description": "[Optional] Company registration number. Only applicable for partners of type company.",
82+
"type": "string",
83+
"pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$"
84+
},
85+
"currency": {
86+
"description": "[Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.",
87+
"type": "string",
88+
"pattern": "^[a-zA-Z0-9]{2,20}$"
89+
},
90+
"date_of_birth": {
91+
"description": "Date of birth format: `yyyy-mm-dd`.",
92+
"type": "string",
93+
"pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$"
94+
},
95+
"email": {
96+
"description": "Email address",
97+
"type": "string",
98+
"pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$"
99+
},
100+
"fatca_declaration": {
101+
"description": "[Optional] Indicates client's self-declaration of FATCA.",
102+
"type": "integer",
103+
"enum": [
104+
0,
105+
1
106+
]
107+
},
108+
"first_name": {
109+
"description": "Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.",
110+
"type": "string",
111+
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$",
112+
"sensitive": 1
113+
},
114+
"landing_company_short": {
115+
"description": "[Optional] If specified, will return only the underlyings for the specified landing company.",
116+
"type": "string",
117+
"enum": [
118+
"maltainvest",
119+
"svg"
120+
]
121+
},
122+
"last_name": {
123+
"description": "Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.",
124+
"type": "string",
125+
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$",
126+
"sensitive": 1
127+
},
128+
"non_pep_declaration": {
129+
"description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates).",
130+
"type": "integer",
131+
"maximum": 1,
132+
"minimum": 0
133+
},
134+
"partner_type": {
135+
"description": "Defines whether this partner is an individual or a company. Only applicable for partners",
136+
"type": "string",
137+
"enum": [
138+
"individual",
139+
"company"
140+
]
141+
},
142+
"phone": {
143+
"description": "[Optional] Starting with `+` followed by 8-35 digits, allowing hyphens or space.",
144+
"type": "string",
145+
"pattern": "^\\d{6,20}$",
146+
"sensitive": 1
147+
},
148+
"provider": {
149+
"description": "[Optional] Name of the provider platform.",
150+
"type": "string",
151+
"enum": [
152+
"myaffiliate",
153+
"dynamicworks"
154+
]
155+
},
156+
"residence": {
157+
"description": "2-letter country code, possible value receive from `residence_list` call.",
158+
"type": "string",
159+
"pattern": "^[a-z]{2}$"
160+
},
161+
"salutation": {
162+
"description": "Accept any value in enum list.",
163+
"type": "string",
164+
"enum": [
165+
"Mr",
166+
"Ms",
167+
"Miss",
168+
"Mrs"
169+
]
170+
},
171+
"tnc_acceptance": {
172+
"description": "The tnc acceptance status of the user.",
173+
"type": "integer",
174+
"enum": [
175+
0,
176+
1
177+
]
178+
},
179+
"website": {
180+
"description": "Partner's Website URI/Promotional Platform",
181+
"type": "string",
182+
"pattern": "^[\\w_@./:#&+-]*$"
183+
},
184+
"loginid": {
185+
"description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.",
186+
"type": "string",
187+
"pattern": "^[A-Za-z]+[0-9]+$"
188+
},
189+
"passthrough": {
190+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
191+
"type": "object"
192+
},
193+
"req_id": {
194+
"description": "[Optional] Used to map request to response.",
195+
"type": "integer"
196+
}
197+
}
198+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"partner_account_creation_status": 1
3+
}

0 commit comments

Comments
 (0)