Skip to main content

개요

/v2/workflows API를 사용하여 홈택스 정보 조회, 문서 파싱, 데이터 수집 등을 자동화할 수 있습니다.

기본 구조

POST https://api.imprun.dev/v2/workflows
Content-Type: application/json
X-API-Key: your-api-key

{
  "type": "scraping",
  "params": {
    "siteCode": "HOMETAX",  // 또는 WEHAGO, DOCUMENT_PARSER
    // API에 따라 다른 파라미터
  }
}

예제 1: 홈택스 자동화

홈택스에서 사업자등록정보를 조회합니다.
curl -X POST https://api.imprun.dev/v2/workflows \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "scraping",
    "params": {
      "siteCode": "HOMETAX",
      "function": "get_business_info",
      "credentialId": "cred_abc123xyz"
    }
  }'
응답:
{
  "id": "wf_abc123xyz",
  "status": "RUNNING",
  "createdAt": "2026-03-07T10:20:00Z",
  "progressUrl": "https://imprun.dev/console/workflows/wf_abc123xyz"
}

예제 2: 웨하고 스크래핑

웨하고 사이트에서 데이터를 수집합니다.
curl -X POST https://api.imprun.dev/v2/workflows \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "scraping",
    "params": {
      "siteCode": "WEHAGO",
      "credentialId": "cred_xyz789",
      "group": "financial",
      "endpoint": "balance-sheet",
      "sessionToken": "..."
    }
  }'

예제 3: 문서 파싱

영수증/계약서 이미지에서 정보를 추출합니다.
curl -X POST https://api.imprun.dev/v2/workflows \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "document_parsing",
    "params": {
      "documentType": "land",
      "imageUrl": "https://..."
    }
  }'

응답 확인

워크플로우가 시작되면 idstatus가 반환됩니다.
  • RUNNING: 현재 진행 중
  • SUCCEEDED: 완료
  • FAILED: 실패
콘솔에서 progressUrl로 이동하여 진행 상황과 결과를 확인할 수 있습니다.
# 상태 확인 (콘솔 방문)
https://imprun.dev/console/workflows/wf_abc123xyz

다음 단계

더 자세한 사용 사례는 사용 사례에서 확인하세요.