# Vend202601\WorkflowsApi

Workflow operations

All URIs are relative to https://example.retail.lightspeed.app/api/2026-01, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createCustomField()**](WorkflowsApi.md#createCustomField) | **POST** /workflows/custom_fields | Define a new custom field |
| [**createRemoteRule()**](WorkflowsApi.md#createRemoteRule) | **POST** /workflows/remote_rules | Create remote rule |
| [**createRule()**](WorkflowsApi.md#createRule) | **POST** /workflows/rules | Create rule |
| [**deleteCustomField()**](WorkflowsApi.md#deleteCustomField) | **DELETE** /workflows/custom_fields/{customFieldId} | Delete a custom field |
| [**deleteRemoteRule()**](WorkflowsApi.md#deleteRemoteRule) | **DELETE** /workflows/remote_rules/{remoteRuleId} | Delete a remote rule |
| [**deleteRule()**](WorkflowsApi.md#deleteRule) | **DELETE** /workflows/rules/{ruleId} | Delete a business rule |
| [**getCustomFieldValues()**](WorkflowsApi.md#getCustomFieldValues) | **GET** /workflows/custom_fields/values | List custom field values |
| [**getCustomFields()**](WorkflowsApi.md#getCustomFields) | **GET** /workflows/custom_fields | List custom field definitions |
| [**getRemoteRules()**](WorkflowsApi.md#getRemoteRules) | **GET** /workflows/remote_rules | List remote rules |
| [**getRules()**](WorkflowsApi.md#getRules) | **GET** /workflows/rules | List rules |
| [**setCustomFieldValues()**](WorkflowsApi.md#setCustomFieldValues) | **POST** /workflows/custom_fields/values | Set new custom field values |
| [**updateCustomField()**](WorkflowsApi.md#updateCustomField) | **PUT** /workflows/custom_fields/{customFieldId} | Update a custom field |


## `createCustomField()`

```php
createCustomField($custom_field_definition_params): \Vend202601\Model\CreateCustomField200Response
```

Define a new custom field

Create a new custom field definition for a given entity type.  🔒 Requires: `custom_fields:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$custom_field_definition_params = new \Vend202601\Model\CustomFieldDefinitionParams(); // \Vend202601\Model\CustomFieldDefinitionParams

try {
    $result = $apiInstance->createCustomField($custom_field_definition_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->createCustomField: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **custom_field_definition_params** | [**\Vend202601\Model\CustomFieldDefinitionParams**](../Model/CustomFieldDefinitionParams.md)|  | |

### Return type

[**\Vend202601\Model\CreateCustomField200Response**](../Model/CreateCustomField200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `createRemoteRule()`

```php
createRemoteRule($remote_business_rule_params): \Vend202601\Model\CreateRemoteRule200Response
```

Create remote rule

Register a new remote rule for the retailer.  🔒 Requires: `remote_rules:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$remote_business_rule_params = new \Vend202601\Model\RemoteBusinessRuleParams(); // \Vend202601\Model\RemoteBusinessRuleParams

try {
    $result = $apiInstance->createRemoteRule($remote_business_rule_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->createRemoteRule: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **remote_business_rule_params** | [**\Vend202601\Model\RemoteBusinessRuleParams**](../Model/RemoteBusinessRuleParams.md)|  | |

### Return type

[**\Vend202601\Model\CreateRemoteRule200Response**](../Model/CreateRemoteRule200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `createRule()`

```php
createRule($business_rule_params): \Vend202601\Model\CreateRule200Response
```

Create rule

Create a rule for the retailer.  🔒 Requires: `business_rules:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$business_rule_params = new \Vend202601\Model\BusinessRuleParams(); // \Vend202601\Model\BusinessRuleParams

try {
    $result = $apiInstance->createRule($business_rule_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->createRule: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **business_rule_params** | [**\Vend202601\Model\BusinessRuleParams**](../Model/BusinessRuleParams.md)|  | |

### Return type

[**\Vend202601\Model\CreateRule200Response**](../Model/CreateRule200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `deleteCustomField()`

```php
deleteCustomField($custom_field_id)
```

Delete a custom field

Delete a custom field and all the values stored on that field.  🔒 Requires: `custom_fields:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$custom_field_id = 'custom_field_id_example'; // string | The ID of the custom field that you want deleted.

try {
    $apiInstance->deleteCustomField($custom_field_id);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->deleteCustomField: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **custom_field_id** | **string**| The ID of the custom field that you want deleted. | |

### Return type

void (empty response body)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `deleteRemoteRule()`

```php
deleteRemoteRule($remote_rule_id)
```

Delete a remote rule

Delete a remote business rule.  🔒 Requires: `remote_rules:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$remote_rule_id = 'remote_rule_id_example'; // string | The ID of the remote business rules that you want deleted.

try {
    $apiInstance->deleteRemoteRule($remote_rule_id);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->deleteRemoteRule: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **remote_rule_id** | **string**| The ID of the remote business rules that you want deleted. | |

### Return type

void (empty response body)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `deleteRule()`

```php
deleteRule($rule_id)
```

Delete a business rule

Delete a business rule.  🔒 Requires: `business_rules:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$rule_id = 'rule_id_example'; // string | The ID of the business rules that you want deleted.

try {
    $apiInstance->deleteRule($rule_id);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->deleteRule: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **rule_id** | **string**| The ID of the business rules that you want deleted. | |

### Return type

void (empty response body)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getCustomFieldValues()`

```php
getCustomFieldValues($entity, $entity_id): \Vend202601\Model\CustomFieldValueCollection
```

List custom field values

Returns the custom field values for a given entity.  🔒 Requires: `custom_fields:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$entity = 'entity_example'; // string | The entity type.
$entity_id = 'entity_id_example'; // string | The entity ID.

try {
    $result = $apiInstance->getCustomFieldValues($entity, $entity_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->getCustomFieldValues: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **entity** | **string**| The entity type. | |
| **entity_id** | **string**| The entity ID. | |

### Return type

[**\Vend202601\Model\CustomFieldValueCollection**](../Model/CustomFieldValueCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getCustomFields()`

```php
getCustomFields($entity): \Vend202601\Model\CustomFieldDefinitionCollection
```

List custom field definitions

Returns the custom field definitions for a given entity type.  🔒 Requires: `custom_fields:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$entity = 'entity_example'; // string | The entity type.

try {
    $result = $apiInstance->getCustomFields($entity);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->getCustomFields: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **entity** | **string**| The entity type. | |

### Return type

[**\Vend202601\Model\CustomFieldDefinitionCollection**](../Model/CustomFieldDefinitionCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getRemoteRules()`

```php
getRemoteRules(): \Vend202601\Model\GetRemoteRules200Response
```

List remote rules

Returns the remote business rules registered on the retailer.  🔒 Requires: `remote_rules:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);

try {
    $result = $apiInstance->getRemoteRules();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->getRemoteRules: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Vend202601\Model\GetRemoteRules200Response**](../Model/GetRemoteRules200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `getRules()`

```php
getRules(): \Vend202601\Model\GetRules200Response
```

List rules

Returns the business rules for the retailer.  🔒 Requires: `business_rules:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);

try {
    $result = $apiInstance->getRules();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->getRules: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Vend202601\Model\GetRules200Response**](../Model/GetRules200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `setCustomFieldValues()`

```php
setCustomFieldValues($custom_field_values_params): \Vend202601\Model\CustomFieldValueCollection
```

Set new custom field values

Set new custom field values on a given entity.  🔒 Requires: `custom_fields:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$custom_field_values_params = new \Vend202601\Model\CustomFieldValuesParams(); // \Vend202601\Model\CustomFieldValuesParams

try {
    $result = $apiInstance->setCustomFieldValues($custom_field_values_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->setCustomFieldValues: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **custom_field_values_params** | [**\Vend202601\Model\CustomFieldValuesParams**](../Model/CustomFieldValuesParams.md)|  | |

### Return type

[**\Vend202601\Model\CustomFieldValueCollection**](../Model/CustomFieldValueCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `updateCustomField()`

```php
updateCustomField($custom_field_id, $update_custom_field_params): \Vend202601\Model\CreateCustomField200Response
```

Update a custom field

Updates properties on a custom field.  🔒 Requires: `custom_fields:write` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\WorkflowsApi(
    // 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
);
$custom_field_id = 'custom_field_id_example'; // string | The ID of the custom field that you want to update.
$update_custom_field_params = new \Vend202601\Model\UpdateCustomFieldParams(); // \Vend202601\Model\UpdateCustomFieldParams

try {
    $result = $apiInstance->updateCustomField($custom_field_id, $update_custom_field_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowsApi->updateCustomField: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **custom_field_id** | **string**| The ID of the custom field that you want to update. | |
| **update_custom_field_params** | [**\Vend202601\Model\UpdateCustomFieldParams**](../Model/UpdateCustomFieldParams.md)|  | |

### Return type

[**\Vend202601\Model\CreateCustomField200Response**](../Model/CreateCustomField200Response.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
