Перейти к основному содержанию
PATCH
/
v2
/
documents
/
{document_id}
cURL
curl --request PATCH \
  --url https://api.example.com/v2/documents/{document_id}/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "source": 0,
  "template": 123,
  "type": "html",
  "content_type": "<string>",
  "object_id": 123,
  "regenerate": false,
  "resign": false,
  "file": "<string>",
  "content": "<string>"
}
'
{
  "id": 123,
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_by": 123,
  "signed": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "files": [
    {
      "id": 123,
      "file": "<string>",
      "type": 0,
      "extra": "<unknown>"
    }
  ],
  "signs": [
    {
      "id": 123,
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "signer": {
        "id": 123,
        "name": "<string>",
        "phone": "<string>",
        "email": "jsmith@example.com",
        "type": "company",
        "outer_id": 0
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "stages": [
        {
          "id": 123,
          "status_from": 0,
          "status_to": 0,
          "created_at": "2023-11-07T05:31:56Z",
          "meta": "<unknown>"
        }
      ],
      "method": 0,
      "method_allowed": [
        16383
      ],
      "status": 0
    }
  ],
  "meta": "<unknown>",
  "name": "<string>",
  "source": 0,
  "template": 123,
  "type": "html",
  "content_type": "<string>",
  "object_id": 123,
  "regenerate": false,
  "resign": false,
  "content": "<string>"
}

Параметры пути

document_id
integer
обязательно

Тело

name
string
source
enum<integer>
по умолчанию:0
  • 0 - generated
  • 1 - uploaded
Доступные опции:
0,
1
template
integer | null
type
enum<string>
  • html - html
  • pdf - pdf
  • docx - docx
  • doc - doc
Доступные опции:
html,
pdf,
docx,
doc
content_type
string | null
object_id
integer | null
regenerate
boolean
по умолчанию:false
resign
boolean
по умолчанию:false
file
string<uri>
content
string | null

Ответ

200 - application/json
id
integer
обязательно
uuid
string<uuid>
обязательно
created_by
integer | null
обязательно
signed
boolean
обязательно
created_at
string<date-time>
обязательно
updated_at
string<date-time>
обязательно
files
object[]
обязательно
signs
object[]
обязательно
meta
any
обязательно
name
string
source
enum<integer>
по умолчанию:0
  • 0 - generated
  • 1 - uploaded
Доступные опции:
0,
1
template
integer | null
type
enum<string>
  • html - html
  • pdf - pdf
  • docx - docx
  • doc - doc
Доступные опции:
html,
pdf,
docx,
doc
content_type
string | null
object_id
integer | null
regenerate
boolean
по умолчанию:false
resign
boolean
по умолчанию:false
content
string | null