레코드 내보내기 요청
작성일 2026.04.23 | 수정일 2026.04.23
POST/crm-core/v1/records/export/request
레코드를 CSV 또는 Excel 파일로 내보내는 작업을 요청한다. 대상 레코드 수에 따라 동기/비동기로 자동 분기되며, 1만 건 이하이면 즉시 생성된 서명 URL(downloadUrl)이 반환된다. 초과 시 비동기 작업이 큐에 등록되고 jobId가 반환된다. 요금제 records.exportEnabled 기능이 활성화된 경우에만 사용 가능하다.
Body Params
| Name | Type | Required | Description |
|---|---|---|---|
| entityId | string | 내보낼 레코드의 개체 ID | |
| format | string | 파일 형식. csv 또는 excel | |
| keyword | string | 레코드 이름 부분 일치 검색어 | |
| filters | string | JSON 직렬화된 필터 조건. 예: {"CRMPP1260423091530123PPP11122233":{"op":"eq","value":"VIP"}} | |
| segmentId | string | 특정 세그먼트에 속한 레코드만 대상으로 할 때 세그먼트 ID |
Response
| Name | Type | Required | Description |
|---|---|---|---|
| mode | string | * | 처리 모드. sync(1만 건 이하) 또는 async(초과 시) |
| downloadUrl | string | 동기 처리 시 즉시 반환되는 서명 다운로드 URL | |
| jobId | string | 비동기 처리 시 조회용 작업 ID. GET /crm-core/v1/records/export/:jobId/status로 상태 확인 |
Structure
코드 예제
const response = await fetch('https://api.solapi.com/crm-core/v1/records/export/request', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + TOKEN,
'Content-Type': 'application/json'
},
body: JSON.stringify({
entityId: 'CRMET1260423081530123XYZ11122233',
format: 'excel',
segmentId: 'CRMSG1260423081530123SGM11122233'
})
});
const { mode, downloadUrl, jobId } = await response.json();
import requests
response = requests.post(
'https://api.solapi.com/crm-core/v1/records/export/request',
headers={'Authorization': f'Bearer {TOKEN}'},
json={
'entityId': 'CRMET1260423081530123XYZ11122233',
'format': 'excel',
'segmentId': 'CRMSG1260423081530123SGM11122233'
}
)
data = response.json()
curl -X POST 'https://api.solapi.com/crm-core/v1/records/export/request' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"entityId":"CRMET1260423081530123XYZ11122233","format":"excel"}'
lightbulb
요금제 기능 플래그 `records.exportEnabled`가 필요하다. 사용 가능 요금제가 아니면 403을 반환한다.
lightbulb
비동기 모드(`mode=async`)에서 발급된 `jobId`는 24시간 동안 상태 조회가 가능하며, 완료 시 다운로드 URL은 추가 서명 유효기간 내에서 사용해야 한다.