[comment]: # ({4012a0bf-4012a0bf})
# service.deletetimes

[comment]: # ({/4012a0bf-4012a0bf})

[comment]: # ({f59e9b02-f59e9b02})
### Description

`object service.deletetimes(string/array serviceIds)`

This method allows to delete all service times from services.

::: noteclassic
This method is only available to *Admin* and *Super admin*
user types. Permissions to call the method can be revoked in user role
settings. See [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
for more information.
:::

[comment]: # ({/f59e9b02-f59e9b02})

[comment]: # ({b97c2b5a-b97c2b5a})
### Parameters

`(string/array)` IDs of the services to delete all service times from.

[comment]: # ({/b97c2b5a-b97c2b5a})

[comment]: # ({4a0ff76e-4a0ff76e})
### Return values

`(object)` Returns an object containing the IDs of the affected services
under the `serviceids` property.

[comment]: # ({/4a0ff76e-4a0ff76e})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({727e8725-727e8725})
#### Deleting service times from an service

Delete all service times from service "2".

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "service.deletetimes",
    "params": [
        "2"
    ],
    "auth": "3a57200802b24cda67c4e4010b50c065",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "serviceids": [
            "2"
        ]
    },
    "id": 1
}
```

[comment]: # ({/727e8725-727e8725})

[comment]: # ({6d17fa88-6d17fa88})
### See also

-   [service.update](update)

[comment]: # ({/6d17fa88-6d17fa88})

[comment]: # ({c99e5046-c99e5046})
### Source

CService::delete() in *ui/include/classes/api/services/CService.php*.

[comment]: # ({/c99e5046-c99e5046})
