> ## 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 reference.
</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 成功

Response body is `application/zip` binary.

### エラー

| HTTP | `code`              | `category`  | Description                            |
| ---- | ------------------- | ----------- | -------------------------------------- |
| 401  | `unauthorized`      | `forbidden` | API キー欠落または無効。                         |
| 404  | `release-not-found` | `not_found` | そのバージョンが存在しない、または App にまだ Release がない。 |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

Python / JavaScript SDK はまだこのエンドポイントをラップしていません。REST を直接呼び出してください。
