Files
aiform_dev/TEST_REAL_DATA.sh

32 lines
1.0 KiB
Bash
Executable File
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.

#!/bin/bash
# Тест с реальными данными из n8n
echo "🧪 Тест привязки документа с реальными данными"
echo "=============================================="
curl -X POST "https://crm.clientright.ru/api_attach_documents.php" \
-H "Content-Type: application/json" \
-d '[
{
"claim_id": "CLM-2025-11-02-WNRZZZ",
"event_type": "delay_flight",
"contact_id": "320096",
"project_id": "396868",
"ticket_id": "396936",
"filename": "flight_delay_boarding_or_ticket.pdf",
"file_type": "flight_delay_boarding_or_ticket",
"file": "/f9825c87-4e3558f6-f9b6-405c-ad3d-d1535c49b61c/crm2/CRM_Active_Files/Documents/HelpDesk/ЗАЯВКА_827_396936/flight_delay_boarding_or_ticket.pdf"
}
]' | jq .
echo ""
echo "✅ Тест завершен!"
echo ""
echo "Ожидаемый результат:"
echo " - success: true"
echo " - total_processed: 1"
echo " - successful: 1"
echo " - attached_to: ticket"
echo " - attached_to_id: 396936"