Seller.areValid
Verifies if passed sellerData is valid. Furthermore the types (email or int) have to be correct when fields are filled.
Execution frequency
Action is performed during the new seller registration.
Request
JSON example:
[
{
"api":1,
"method":"auth",
"params":{
"username":"...",
"password":"..."
},
"id":1
},
{
"api": 1,
"method": "Seller.areValid",
"params": {
"sellerData": [
{
"email": "[email protected]",
"name": "Owner name",
"phone": "+420777777777",
"address1": "Johannisstr. 20",
"city": "Berlin",
"postcode": "10117",
"country": "DE"
},
{
"company_name": "Sells 4 Life",
"shop_name": "Company Which Sells 4 Life",
"email": "[email protected]",
"name": "Owner name",
"phone": "+420777777777",
"address1": "Johannisstr. 20",
"city": "Berlin",
"postcode": "10117",
"country": "DE"
},
{
"company_name": "Failing Company",
"shop_name": "Failing Company Without Email",
"name": "Owner name",
"phone": "+420777777777",
"address1": "Johannisstr. 20",
"city": "Berlin",
"postcode": "10117",
"country": "DE"
}
]
},
"id": 1
}
]
Request fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
method |
string |
"Seller.areValid" |
Action name |
company_name |
string |
"Sells 4 Life" |
Company name |
shop_name |
string |
"Company Which Sells 4 Life" |
Shop name |
string |
Company email |
||
name |
string |
"Owner name" |
Company owner |
phone |
string |
"+420777777777" |
Company phone number |
address1 |
string |
"Johannisstr. 20" |
Address |
city |
string |
"Berlin" |
City |
postcode |
string |
"10117" |
Postal Code |
country |
string |
"DE" |
Country code |
Response
Returns an array with true or false as value if the seller is valid or not. The key / indicator is the company name, if this was not passed for the seller than a numeric index is created.
JSON example:
[
{
"api":1,
"result":{
"0:false,
"Sells 4 Life":true,
"Failing Company":false
},
"id":1
}
]
Response fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
result |
array |
[ 0 => false "Sells 4 Life" => true, "Failing Company" => true, ] |
Array of company names and valid status:
|