---
url: https://gudhub.com/ru/docs/core-api/field-processor/
title: "Field Processor\n                #"
description: "Field processor is responsible for receiving, updating fields models. Also with field processor you can get and update field values. All field methods are colle"
lang: uk
updated: 2026-09-11T15:23:44.336Z
---

# Field Processor [#](https://gudhub.com/ru/docs/core-api/field-processor/#field-processor)

Field processor is responsible for receiving, updating fields models. Also with field processor you can get and update field values.

All field methods are collected and described in this article:

1.  [getField](#getfield)
    
2.  [updateField](#updatefield)
    
3.  [deleteField](#deletefield)
    
4.  [getFieldModels](#getfieldmodels)
    
5.  [getFieldValue](#getfieldvalue)
    
6.  [setFieldValue](#setfieldvalue)
    

## getField() [#](https://gudhub.com/ru/docs/core-api/field-processor/#getfield)

Due to this method you can get field from the relevant application. It takes application and field IDs as arguments.

Копировать

```js
async gudhub.getField(app_id, field_id)
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to get the field model_ |
| field\_id | `number` | _field ID that we want to receive_ |

Копировать

```js
import GudHub from '@gudhub/core';

const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';
let app_id = 23;
let field_id = 34212;

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let gottenField = await gudhub.getField(app_id, field_id);
    console.log(gottenField)
})();
```

Method returns field model from specific application:

Копировать

```json
{
    "app_id": 23,
    "field_id": 34212,
    "data_type": "image",
    "name_space": "thumbnail",
    "field_priority": 0,
    "field_name": "Thumbnail",
    "data_model": {...}
}
```

## updateField() [#](https://gudhub.com/ru/docs/core-api/field-processor/#updatefield)

This method allows you to update field model of the current application. It take two arguments:

Копировать

```js
async gudhub.updateField(app_id, fieldModel);
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to update the field model_ |
| fieldModel | `object` | _contains existing field data_ |

Копировать

```js
import GudHub from '@gudhub/core';

const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';
let app_id = 23;
let fieldModel = {
    "app_id": 23,
    "field_id": 505247,
    "data_type": "image",
    "name_space": "thumbnail",
    "field_priority": 0,
    "field_name": "Thumbnail",
    "data_model": {...}
};

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let updatedField = await gudhub.updateField(app_id, fieldModel);
    console.log(updatedField)
})();
```

The method returns an updated field model:

Копировать

```json
{
    "app_id": 23,
    "field_id": 505247,
    "data_type": "image",
    "name_space": "thumbnail",
    "field_priority": 0,
    "field_name": "Thumbnail",
    "data_model": {...}
}
```

## deleteField() [#](https://gudhub.com/ru/docs/core-api/field-processor/#deletefield)

The method is responsible for deleting field from the application. Its arguments are application and field IDs.

Копировать

```js
gudhub.deleteField(app_id, field_id)
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to delete the field model_ |
| field\_id | `number` | _unique field ID_ |

Копировать

```js
import GudHub from '@gudhub/core';
const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';

let app_id = 23;
let field_id = 34545;

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let deletedField = await gudhub.deleteField(app_id, field_id);
    console.log(deletedField)
})();
```

In response, we will get the model of the deleted field.

Копировать

```json
{
    "app_id": 23,
    "field_id": 34545,
    "data_type": "text",
    "name_space": "first-name",
    "field_priority": 0,
    "field_name": "First Name",
    "data_model": {...}
}
```

## getFieldModels() [#](https://gudhub.com/ru/docs/core-api/field-processor/#getfieldmodels)

This method is used for getting a list of field models. It takes applications ID as an argument.

Копировать

```js
async gudhub.getFieldModels(app_id)
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to get the field models_ |

Копировать

```js
import GudHub from '@gudhub/core';

const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';
let app_id = 23;

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let fieldModels = await gudhub.getFieldModels(app_id);
    console.log(fieldModels)
})();
```

It returns a response with an array of application field models.

Копировать

```json
[{
    "app_id": 23,
    "field_id": 34545,
    "data_type": "text",
    "name_space": "first-name",
    "field_priority": 0,
    "field_name": "First Name",
    "data_model": {...}
},…]
```

## getFieldValue() [#](https://gudhub.com/ru/docs/core-api/field-processor/#getfieldvalue)

This method is responsible for getting the value from the desired field. It takes application, item and field IDs as arguments.

Копировать

```js
async gudhub.getFieldValue(app_id, item_id, field_id)
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to get the field model_ |
| item\_id | `number` | _item ID where we want to get the field model_ |
| field\_id | `number` | _unique field ID_ |

Копировать

```js
import GudHub from '@gudhub/core';

const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';
let app_id = 23;
let item_id = 22432;
let field_id = 111212;

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let fieldValue = await gudhub.getFieldValue(app_id, item_id, field_id);
    console.log(fieldValue)
})();
```

The method returns value from desired field:

Копировать

```json
"value"
```

## setFieldValue() [#](https://gudhub.com/ru/docs/core-api/field-processor/#setfieldvalue)

This method is called to set value in the desired field. It takes application, item, and field IDs and, of course, the very value as arguments.

Копировать

```js
async gudhub.setFieldValue(app_id, item_id, field_id, field_value)
```

| Argument Name | Type | Description |
| :-- | :-- | :-- |
| app\_id | `number` | _application ID where we want to set field value_ |
| item\_id | `number` | _item ID where we want to set field value_ |
| field\_id | `number` | _field ID where we want to set field value_ |
| field\_value | `string` | _value to be set in the field_ |

Копировать

```js
import GudHub from '@gudhub/core';

const AUTHKEY = 'kLKKSlfjMmslk;eks;ldfspfk,v';
let app_id = 23;
let item_id = 22432;
let field_id = 111212;
let field_value = "John Dow";

(async ()=>{
    const gudhub = await new GudHub(AUTHKEY);
    let setFieldValue = await gudhub.setFieldValue(app_id, item_id, field_id, field_value);
    console.log(setFieldValue)
})();
```

The method returns the set value.

Копировать

```json
"John Dow"
```
