# OpenAPI\Client\WorkOrdersApi All URIs are relative to https://api.stateset.com/v1, except if the operation defines another base path. | Method | HTTP request | Description | | ------------- | ------------- | ------------- | | [**getWorkOrderById()**](WorkOrdersApi.md#getWorkOrderById) | **GET** /workorders/{id} | Get work order by id | | [**getWorkOrdes()**](WorkOrdersApi.md#getWorkOrdes) | **GET** /workorders | Get account by work order id | | [**updateWorkOrder()**](WorkOrdersApi.md#updateWorkOrder) | **PUT** /workorders/{id} | Updated work order | ## `getWorkOrderById()` ```php getWorkOrderById($id): \OpenAPI\Client\Model\WorkOrder ``` Get work order by id Some description of the operation. You can use `Markdown` here. ### Example ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure OAuth2 access token for authorization: main_auth $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\Client\Api\WorkOrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string | The id that needs to be fetched try { $result = $apiInstance->getWorkOrderById($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling WorkOrdersApi->getWorkOrderById: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| The id that needs to be fetched | | ### Return type [**\OpenAPI\Client\Model\WorkOrder**](../Model/WorkOrder.md) ### Authorization [api_key](../../README.md#api_key), [main_auth](../../README.md#main_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json`, `application/problem+json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `getWorkOrdes()` ```php getWorkOrdes($limit, $offset, $order_direction): \OpenAPI\Client\Model\WorkOrder ``` Get account by work order id Some description of the operation. You can use `Markdown` here. ### Example ```php setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); // Configure OAuth2 access token for authorization: main_auth $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\Client\Api\WorkOrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $limit = 3.4; // float | The number of items to return $offset = 3.4; // float | Offset to return work orders $order_direction = 'order_direction_example'; // string | Direction to return work orders try { $result = $apiInstance->getWorkOrdes($limit, $offset, $order_direction); print_r($result); } catch (Exception $e) { echo 'Exception when calling WorkOrdersApi->getWorkOrdes: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **limit** | **float**| The number of items to return | | | **offset** | **float**| Offset to return work orders | | | **order_direction** | **string**| Direction to return work orders | | ### Return type [**\OpenAPI\Client\Model\WorkOrder**](../Model/WorkOrder.md) ### Authorization [api_key](../../README.md#api_key), [main_auth](../../README.md#main_auth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: `application/json`, `application/problem+json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) ## `updateWorkOrder()` ```php updateWorkOrder($id, $work_order) ``` Updated work order This can only be done by the logged in user. ### Example ```php setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\Client\Api\WorkOrdersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string | The id that needs to be updated $work_order = new \OpenAPI\Client\Model\WorkOrder(); // \OpenAPI\Client\Model\WorkOrder | Updated work order object try { $apiInstance->updateWorkOrder($id, $work_order); } catch (Exception $e) { echo 'Exception when calling WorkOrdersApi->updateWorkOrder: ', $e->getMessage(), PHP_EOL; } ``` ### Parameters | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **id** | **string**| The id that needs to be updated | | | **work_order** | [**\OpenAPI\Client\Model\WorkOrder**](../Model/WorkOrder.md)| Updated work order object | | ### Return type void (empty response body) ### Authorization [main_auth](../../README.md#main_auth) ### HTTP request headers - **Content-Type**: `application/json`, `application/xml` - **Accept**: `application/problem+json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md)