Перейти к основному содержанию
POST
/
v2
/
documents
cURL
curl --request POST \
  --url https://api.example.com/v2/documents/ \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=<string>' \
  --form source=0 \
  --form template=123 \
  --form type=html \
  --form 'content_type=<string>' \
  --form object_id=123 \
  --form regenerate=false \
  --form resign=false \
  --form 'file=<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
    }
  ],
  "name": "<string>",
  "source": 0,
  "template": 123,
  "type": "html",
  "content_type": "<string>",
  "object_id": 123,
  "regenerate": false,
  "resign": false
}

Тело

multipart/form-data
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>

Ответ

201 - 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[]
обязательно
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