Page 1 of 1

create a form that use api to give a sub account to custmer

Posted: Tue May 10, 2016 5:51 am
i need to create a a form in my wesitethat use api to give the possibility who buy an our sub account to create it self.. i have seen the script api jason:
{
"authentication": {
"apiKey": "apiKeyAsSetInAccountSettings"
},
"createAccount": [
{
"username": "username",
"password": "password",
"apiKey": "YourKeyToUseForTheNewAccount",
"email": "[email protected]",
"role": "0"
}
]
}
but this maybe create an account i need to create a sub account because we are a reseller .
can you say me if is possible and how i combine this script to put in a form?

Re: create a form that use api to give a sub account to cust

Posted: Tue May 10, 2016 7:33 am
by markkinchin
The function you reference will create a sub account in your account so it is exactly what you need.

https://api.beds24.com/json/createAccount

Re: create a form that use api to give a sub account to cust

Posted: Tue May 10, 2016 10:46 am
yes but i don't know how to rewite the cose in php or http post to put him in one page inside my site to give the possibility to aour custmer to do it it self
can you give me the php code or http code to put in my page please

Re: create a form that use api to give a sub account to cust

Posted: Tue May 10, 2016 12:36 pm
by markkinchin
[email protected] wrote:yes but i don't know how to rewite the cose in php or http post to put him in one page inside my site to give the possibility to aour custmer to do it it self
can you give me the php code or http code to put in my page please
There is a sample PHP script here to modify property details: https://api.beds24.com/json/modifyProperty
It could be modified to work with the createAccount function and your form.
You probably need someone experienced with PHP to assist you.