Migrated from Redmine #441 | Author: Arian Hojat
Status: Closed | Priority: Low, I can wait | Created: 2019-11-12
Hello,
quick question… Note: we are a paying user if that helps expedite this support request …
Our main account that we pay for is under the ‘globalaes’ company under my boss Anand Gopalakrishnan(I am testing under my own ‘testing’ account under the company ‘arian’).
So I’m looping through an Excel of ‘Sites’ and adding a Service Provider via the PHP JsonRpcClient.php and I noticed that shows up out-of-order in the SimplyBook GUI and I’d prefer they show up listed in the same order as my Excel rows.
Just curious, as I loop through the sites, how can I just say ‘Add it to the end of the list’ in the ‘addServiceProvider’ API request?
I was hoping i could set the ‘position’ to a really high number and SimplyBook would automatically figure out the highest/last number in the list but that didn’t seem to work.
Note: I already have a few sites in my test account, so hence why i just didn’t put the ‘iteration/row number’ as the ‘position’ (that would have been the easiest solution).
Was hoping there was a ‘smart way’ to just set the position to the end of the list.
$data = array(
‘name’=> $info[‘site_name’],
‘description’=> $info[‘site_desc’],
‘phone’=> $info[‘site_phone’],
‘email’=> $info[‘site_contact_email’],
‘is_visible’=> 1,
‘is_active’=> 1,
‘services’=> [1],
‘qty’=> 3, //might be ‘How many clients can be served at the same time?’
//‘position_in_location’=> null, can i leave out?
//‘position’=> 666, //???
);
$output = $client->addServiceProvider($data);