Files
crm.clientright.ru/docs/n8n_http_request_debexpert_setup.md
Fedor 01c4fe80b5 chore: snapshot current working tree changes
Save all currently accumulated repository changes as a backup snapshot for Gitea so no local work is lost.
2026-03-26 14:19:01 +03:00

54 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Настройка HTTP Request для отправки в Debexpert (после Prepare Code)
После ноды **Code** с скриптом `n8n_prepare_for_http_debexpert.js` ставим ноду **HTTP Request**.
## Параметры HTTP Request
- **Method:** POST
- **URL:** `https://explorer-proxy.debex.ru/api/v3/production/sudrf`
### Headers
| Name | Value |
|------|--------|
| x-api-key | `productionklientpravkjnkjnhkhj87y!` |
| hidden-authorization-cookies | `{{ $json.cookies }}` |
| hidden-certificate-pin | `3365` |
| custom | `Zx123456` |
### Body
- **Body Content Type:** Form-Data / Multipart form-data (как в твоей версии n8n называется).
### Body Parameters (по порядку)
1. **fillData** — тип Text
- Value: `{{ $json.fillDataString }}`
2. **certificate** — тип File / Binary
- Binary Property: `certificate`
- File Name: `cert.pfx` (или `{{ $binary.certificate.fileName }}`)
3. **files** — тип File / Binary
- Binary Property: `data_0`
- File Name: `{{ $json.files[0].filename }}`
4. **files** — Binary Property: `data_1`, File Name: `{{ $json.files[1].filename }}`
5. **files** — Binary Property: `data_2`, File Name: `{{ $json.files[2].filename }}`
… и так далее до **data_16** (всего 17 строк с именем **files**).
Если в n8n нельзя добавить несколько параметров с одним именем **files**, в интерфейсе будет либо «Add parameter» много раз, либо список — добавь 17 строк, в каждой Name = `files`, Value = Binary, выбери соответствующее свойство `data_0`, `data_1`, … `data_16` и подставь имя файла из `$json.files[i].filename`.
### Таймаут
- **Timeout:** 120000 (2 минуты) или больше, если API долго обрабатывает.
---
## Итог цепочки
1. **Code** (`n8n_prepare_for_http_debexpert.js`) — проверка + `fillDataString`.
2. **HTTP Request** — POST, multipart: fillData + certificate + 17× files, заголовки выше.
Ответ Debexpert придёт в выходе HTTP Request (парси при необходимости следующей нодой).