Company administration service methods: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1,596: | Line 1,596: | ||
"unit_group_id":"", | "unit_group_id":"", | ||
"event_id":"" | "event_id":"" | ||
} | |||
</pre> | |||
---- | |||
=== addServiceProvider=== | |||
<code>addServiceProvider($data)</code> | |||
Parameters: | |||
* '''$data''' Array | |||
Returns Array with result and id of new service provider (unit_group) | |||
Create new service provider | |||
Example: | |||
<pre> | |||
{ | |||
"name" => "newtagg1 - 4", | |||
"description" => "Description - 1", | |||
"phone" => "1234567890", | |||
"email" => "test@test.com", | |||
"qty" => "2", | |||
"is_visible" => 1, | |||
"is_active" => 1, | |||
"position" => 2, | |||
"seo_url" => null, | |||
"position_in_location" => null, | |||
} | |||
</pre> | |||
---- | |||
=== editServiceProvider=== | |||
<code>editServiceProvider($id, $data)</code> | |||
Parameters: | |||
* '''$id''' Integer | |||
* '''$data''' Array | |||
Returns Array with result and id of new service provider (unit_group) | |||
Edit service provider | |||
(there is no way to delete provider via API, in this case set is_active = 0) | |||
Example: | |||
<pre> | |||
1, | |||
{ | |||
"name" => "newtagg1 - 4", | |||
"description" => "Description - 1", | |||
"phone" => "1234567890", | |||
"email" => "test@test.com", | |||
"qty" => "2", | |||
"is_visible" => 1, | |||
"is_active" => 1, | |||
"position" => 2, | |||
"seo_url" => null, | |||
"position_in_location" => null, | |||
} | } | ||
</pre> | </pre> | ||