体験デモ

請求書の PDF 発行の体験デモ

宛先・品目・数量・単価を入力して[PDF の発行]を押すと、DocRelay の API で請求書の PDF を発行します。金額・消費税額・合計は入力から計算します。登録の前に、その場で試せます。

明細 1
明細 2
明細 3

この発行を API で行う場合

体験デモと同じ発行は、管理画面で作ったテンプレートの名前と差し込む値を POST /v1/renders に送るだけです。応答の本文が PDF です。

curl https://api.docrelay.jp/v1/renders \
  -H "Authorization: Bearer $DOCRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "請求書",
    "data": {
      "customer": { "name": "株式会社見本製作所" },
      "subject": "ご利用料金",
      "items": [
        { "name": "クラウドサービス利用料", "qty": 1, "price": 50000, "tax_rate": "10%", "amount": 50000 }
      ]
    }
  }' \
  -o invoice.pdf