> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 계약 다운로드

> 최신 Release 작성자 계약을 슬롯 zip으로 다운로드.

**`GET`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/contract.zip`

인증: API 키 필요(`Authorization: Bearer <API Key>`). App 작성자만. 그 외 `404`.

최신 Release의 작성자용 계약을 정규 계약 폴더 배치로 분할해 서버에서 zip. 슬롯 편집 왕복용.

Release 0건은 `404 release-not-found`: 의미는 「최신 Release」이며 드래프트로 폴백하지 않음. 비스롯 편집 부가 상태는 생략되어 download → edit → import는 슬롯 기준 무손실 왕복.

## 요청

### 경로 파라미터

<ParamField path="app_id" type="string" required>
  App 참조.
</ParamField>

### 요청 예시

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/contract.zip"
```

## 응답

### 200 성공

응답 본문은 `application/zip` 바이너리입니다.

### 오류

| HTTP | `code`              | `category`  | 설명                               |
| ---- | ------------------- | ----------- | -------------------------------- |
| 401  | `unauthorized`      | `forbidden` | API 키 누락 또는 무효.                  |
| 404  | `release-not-found` | `not_found` | 해당 버전 없음, 또는 App에 아직 Release 없음. |

오류 응답은 `{"error": {code, category, message, retryable}}`입니다. <a href="/docs/ko/datahub/api/reference/introduction#errors">오류</a> 참고.

## 클라이언트 라이브러리

Python / JavaScript SDK는 아직 이 엔드포인트를 감싸지 않습니다. REST를 직접 호출하세요.
