curl -X POST -H "Content-Type: application/json" -d \
'{
"key": "Loremipsumdolorsitametconsecteturadipiscingelitlaoreet",
"owner_code": "netstorming",
"dry_run": true,
"customers": [
{
"code": "test01",
"name": "Test customer from API 1",
"address": "test1",
"zip": "test1",
"mailstaff": "test1@netstorming.net",
"notify_lang": "it",
"booking_online": true,
"blocked_in_deadline": false,
"credit_card": true,
"telephone": "0418877780",
"fax": "0418877781",
"currency": "EUR",
"admin_user_name": "test1 usr",
"admin_user_email": "test1@netstorming.net",
"admin_user_login": "test1",
"admin_user_psw": "test1",
"country": "IT",
"city": "VCEI",
"additional_users": [
{
"name": "Simple user 1",
"email": "user1@netstorming.net",
"login": "simple1",
"psw": "secret!",
"role": "user"
}
]
},
{
"code": "INVALID01",
"name": "Test with invalid data",
"zip": "test1",
"mailstaff": "test1@netstorming.net",
"notify_lang": "bu",
"booking_online": 42,
"blocked_in_deadline": false,
"credit_card": true,
"telephone": "0418877780",
"fax": "0418877781",
"currency": "BGK",
"admin_user_name": "test1 usr",
"admin_user_email": "test1@netstorming.net",
"admin_user_login": "test1",
"admin_user_psw": "test1",
"country": "IT",
"city": "VCEI"
}
]
}' https://test.netstorming.net/api/customers/insert
{
"dry_run": true,
"results": [
{
"code": "test01",
"customer": false,
"user": false
}
],
"errors": [
{
"line\/index": 1,
"errors": [
"missing address",
"invalid notify_lang",
"invalid booking_online (valid values: yes, no, y, n, true, false, 1, 0)"
]
}
]
}
NOTE: The results are FALSE due to dry run