---
url: https://gudhub.com/ru/docs/rest-api/documents/
title: "Documents\n                #"
description: "Documents are the JSON arrays of objects and related to NoSQL databases. The document requests allow working with such data, creating a new one, and deleting it"
lang: uk
updated: 2026-09-11T12:37:41.315Z
---

# Documents [#](https://gudhub.com/ru/docs/rest-api/documents/#documents)

Documents are the JSON arrays of objects and related to NoSQL databases. The document requests allow working with such data, creating a new one, and deleting it:

1.  [document/insert-one](#document-insert-one)
2.  [document/find-one](#document-find-one)

## document/insert-one [#](https://gudhub.com/ru/docs/rest-api/documents/#document-insert-one)

The current request is called to update the document or add a new one if it does not exist.

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

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub_Test/api/new/document/insert-one` |

The current request consists of token and the document object.

| Name | Type | Description |
| :-- | :-- | :-- |
| document | `object` | _contains data about document location_ |
| token | `string` | _allows to get access_ |

#### **Example:** [#](https://gudhub.com/ru/docs/rest-api/documents/#example)

Копировать

```json
  document: {
    "app_id":"28877",
    "item_id":"3118314",
    "element_id":693593,
    "data":"{}"
  }
  token: thog-tayjf-.k-cbeapsebnqawkphhiny-ursyqsn
```

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

As a result, it returns the full document object.

Копировать

```json
{
  "app_id": 28877,
  "data": "{}",
  "element_id": 693593,
  "item_id": 3118314,
  "last_update": 1660053018469,
  "document_id": "62f2661a90089904e853c9b9"
}
```

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

| Name | Description |
| :-- | :-- |
| 200 Ok | document is deleted |

## document/find-one [#](https://gudhub.com/ru/docs/rest-api/documents/#document-find-one)

This is hte request that allows to find the document. If such a document does not exist, it will be created.

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

| Request Method | Content Type | Request URL |
| :-- | :-- | :-- |
| `POST` | `Form Data` | `https://gudhub.com/GudHub_Test/api/new/document/find-one` |

A query consists of a token and the document itself.

| Name | Type | Description |
| :-- | :-- | :-- |
| document | `object` | _contains the partial data of the document_ |
| token | `string` | _allows to get the access_ |

#### **Example:** [#](https://gudhub.com/ru/docs/rest-api/documents/#example-1)

Копировать

```json
  document: {
    "app_id":"28877",
    "item_id":"3118314",
    "element_id":693593
  }
  token: uz-ewes.fmrfjrfiyprcjny_iimoleix_hmusbni
```

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

In response, it will return the full document object

Копировать

```json
{
  "app_id": 28877,
  "data": "{}",
  "element_id": 693593,
  "item_id": 3118314,
  "last_update": 1660053018469,
  "document_id": "62f2661a90089904e853c9b9"
}
```

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

| Name | Description |
| :-- | :-- |
| 200 Ok | document is deleted |
