メインコンテンツへスキップ
POST
/
docgen_batches
cURL
curl -L 'https://api.box.com/2.0/docgen_batches' \
     -H 'box-version: 2025.0' \
     -H 'Authorization: Bearer <ACCESS_TOKEN>' \
     -D '{
        "file": {
            "id": "12345678",
            "type": "file"
        },
        "input_source": "api",
        "destination_folder": {
            "id": "12345678",
            "type": "folder"
        },
        "output_type": "docx",
        "document_generation_data": [
            {
                "generated_file_name": "Image test",
                "user_input": {
                    "order": {
                        "id": "12305",
                        "date": "18-08-2023",
                        "country": "US",
                        "expiryDate": "18-08-2024",
                        "currency": "$",
                        "amount": 5060.5,
                        "taxRate": 10,
                        "requester": "John",
                        "approver": "Smith",
                        "department": "Procurement",
                        "paymentTerms": "30 days",
                        "deliveryTerms": "30 days",
                        "deliveryDate": "18-09-2023",
                        "vendor": {
                            "company": "Example company",
                            "address": {
                                "street": "Example street",
                                "city": "Example city",
                                "zip": "EX-456"
                            }
                        },
                        "products": [
                            {
                                "id": 1,
                                "name": "A4 Papers",
                                "type": "non-fragile",
                                "quantity": 100,
                                "price": 29,
                                "amount": 2900
                            },
                            {
                                "id": 2,
                                "name": "Ink  Cartridge",
                                "type": "non-fragile",
                                "quantity": 40,
                                "price": 39,
                                "amount": 1560
                            },
                            {
                                "id": 3,
                                "name": "Adhesive tape",
                                "type": "non-fragile",
                                "quantity": 20,
                                "price": 30,
                                "amount": 600.5
                            }
                        ]
                    }
                }
            }
        ]`
{
  "id": "12345",
  "type": "docgen_batch"
}

Documentation Index

Fetch the complete documentation index at: https://developer.box.com/llms.txt

Use this file to discover all available pages before exploring further.

Box SDKのバージョニング戦略について詳しく学ぶ。」

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

ヘッダー

box-version
enum<string>
必須

Version header.

利用可能なオプション:
2025.0

ボディ

application/json

Box Doc Genジョブのバッチリクエストを作成するためのスキーマ。

file
ファイルの参照 · object
必須

ドキュメントの生成に使用されるBox Doc Genテンプレート。

input_source
string
必須

入力のソース。この値は、APIベースのすべてのドキュメント生成リクエストでapiにする必要があります。

:

"api"

destination_folder
フォルダの参照 · object
必須

生成されたファイルの保存先フォルダ。

output_type
string
必須

出力ファイルの種類。

:

"docx"

document_generation_data
ドキュメント生成データ · object[]
必須
file_version
ファイルバージョン (Base) · object

テンプレートのファイルバージョン。

レスポンス

作成されたバッチID。

Box Doc GenバッチオブジェクトのBase版の表示。Box Doc Genのバッチには、1つ以上のBox Doc Genジョブが含まれています。

id
string
必須

Box Doc Genのバッチを表す一意の識別子。

:

"12345"

type
enum<string>
必須

値は常にdocgen_batchになります。

利用可能なオプション:
docgen_batch
:

"docgen_batch"