---
url: https://gudhub.com/docs/rest-api/items/
title: "Item\n                #"
description: "These requests are aimed at working with items. Since elements are contained in items, deleting item request leads to removing elements and their data too. Ther"
lang: uk
updated: 2026-09-08T15:40:57.350Z
---

# Item [#](https://gudhub.com/docs/rest-api/items/#item)

These requests are aimed at working with items. Since elements are contained in items, deleting item request leads to removing elements and their data too.

There are four item requests:

1.  [item/add](#item-add)
2.  [item/update](#item-update)
3.  [item/delete](#item-delete)
4.  [item/get](#item-get)

## item/add [#](https://gudhub.com/docs/rest-api/items/#item-add)

Request for adding a new item to the application.

### Request [#](https://gudhub.com/docs/rest-api/items/#request)

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub/api/items/add` |

It contains an array of items with added data, application ID, and token.

| Name | Type | Description |
| :-- | :-- | :-- |
| token | `string` | _using for getting access_ |
| app\_id | `object` | _unique application ID_ |
| items | `array` | _array of added data_ |

_**Example:**_

Copy

```json
      items:[{
         "item_id":0,
         "fields":[]
      }]
      app_id: 3733

      token:
      beyewulqzxnbd.tifrvcgdulrnmovvasdyizwbdjykn
```

### Response [#](https://gudhub.com/docs/rest-api/items/#response)

In return will be an array of item objects.

Copy

```json
[{
  "item_id":81907,
  "index_number":8,
  "last_update":1502099832000,
  "fields":[{ }]
}]
```

### Status Code [#](https://gudhub.com/docs/rest-api/items/#status-code)

| Name | Description |
| :-- | :-- |
| 200 Ok | item is added |
| 710 | user have no right to add items |

## item/update [#](https://gudhub.com/docs/rest-api/items/#item-update)

Request for data updating in the existed item.

### Request [#](https://gudhub.com/docs/rest-api/items/#request-1)

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub/api/items/update` |

It contains an array of updated items, application ID, and token.

| Name | Type | Description |
| :-- | :-- | :-- |
| token | `string` | _using for getting access_ |
| app\_id | `number` | _contains ID of the application whose items will be updated_ |
| items | `array` | _contains items with updated data_ |

_**Example:**_

Copy

```json
      items:[{
         "item_id":"81905",
         "fields":[{
               "field_id":"42530",
               "field_value":"test"
            }]
      }]
      app_id: 3733


      token:beyewulqzxnbd.tifrvcgdulrnmovvasdyizwbdjykn
```

### Response [#](https://gudhub.com/docs/rest-api/items/#response-1)

As a result, we will see updated file information.

Copy

```json
{
 "item_id":81905,
 "index_number":6,
 "last_update":1502099396000,
 "fields":[{
      "field_id":42530,
      "field_value":"test",
      "data_id":467973
   }]
}
```

### Status Code [#](https://gudhub.com/docs/rest-api/items/#status-code-1)

| Name | Description |
| :-- | :-- |
| 000 Unupdate | wrong properties (expansion, size, ...) |
| 200 Ok | item is updated |
| 710 | user have no right to update items |

## item/delete [#](https://gudhub.com/docs/rest-api/items/#item-delete)

Request for deleting an item. When we do it all documents in item will be deleted too.

### Request [#](https://gudhub.com/docs/rest-api/items/#request-2)

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub/api/items/delete` |

It contains an array of item IDs and token.

| Name | Type | Description |
| :-- | :-- | :-- |
| items\_ids | `array` | _array of deleted data_ |

_**Example:**_

Copy

```json
      items_ids: [81904]

      token:beyewulqzxnbd.tifrvcgdulrnmovvasdyizwbdjykn
```

### Response [#](https://gudhub.com/docs/rest-api/items/#response-2)

In response, you will receive all the updated items.

Copy

```json
[{
      "fields": [{
            "field_id": 684731, 
            "element_id": 684731, 
            "field_value": "1659365564518", 
            "data_id": 23432835
      }],
      "index_number": 6,
      "item_id": 81904,
      "last_update": 1659508824000
}]
```

### Status Code [#](https://gudhub.com/docs/rest-api/items/#status-code-2)

| Name | Description |
| :-- | :-- |
| 200 Ok | item/items with specified ID is deleted |
| 710 | user have no right to delete items |

## item/get [#](https://gudhub.com/docs/rest-api/items/#item-get)

Request for getting items of the application, optionally filtered by field values.

### Request [#](https://gudhub.com/docs/rest-api/items/#request-3)

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub/api/items/get` |

It contains the application ID, token, and optional pagination and filtering parameters.

| Name | Type | Description |
| :-- | :-- | :-- |
| token | `string` | _using for getting access_ |
| app\_id | `number` | _unique application ID_ |
| offset | `number` | _optional, number of items to skip, used for pagination (default `0`)_ |
| limit\_to | `number` | _optional, maximum number of items to return; `0` means no limit (default `0`)_ |
| filter\_list | `array` | _optional, array of filter objects used to filter the returned items (JSON-stringified)_ |
| items\_list | `array` | _optional, array of specific item IDs to fetch (JSON-stringified)_ |

Each object in `filter_list` describes a single condition:

| Property | Type | Description |
| :-- | :-- | :-- |
| field\_id | `number` | _ID of the field the filter is applied to_ |
| data\_type | `string` | _type of the field's data, e.g. `text`, `number`, `date`, `phone`, `gps_coords`_ |
| boolean\_strategy | `string` | _how multiple filters are combined, e.g. `and`_ |
| valuesArray | `array` | _array of strings with the values/search terms to filter by_ |
| search\_type | `string` | _comparison to apply: `equal_and`, `equal_or`, `not_equal_and`, `not_equal_or`, `contain_and`, `contain_or`, `not_contain_and`, `not_contain_or`, `bigger`, `lower`, `range`, `value`, `phone_equal_or`, `distance`, `date_in`, `date_out`, `recurring_date`_ |
| selected\_search\_option\_variable | `string` | _search option variable, e.g. `Value`_ |

_**Example:**_

Copy

```json
      app_id: 3733

      offset: 0

      limit_to: 0

      filter_list: [{
         "field_id": 42530,
         "data_type": "text",
         "boolean_strategy": "and",
         "valuesArray": ["John", "Tom"],
         "search_type": "equal_and",
         "selected_search_option_variable": "Value"
      }]

      token:
      beyewulqzxnbd.tifrvcgdulrnmovvasdyizwbdjykn
```

### Response [#](https://gudhub.com/docs/rest-api/items/#response-3)

In return will be an array of item objects matching the filter (or all items, if no filter was passed).

Copy

```json
[{
  "item_id":81905,
  "index_number":6,
  "last_update":1502099396000,
  "fields":[{
        "field_id":42530,
        "field_value":"John",
        "data_id":467973
     }]
}]
```

### Status Code [#](https://gudhub.com/docs/rest-api/items/#status-code-3)

| Name | Description |
| :-- | :-- |
| 200 Ok | items received |
| 710 | user have no right to view items |
