Service agreement template

A service (outsourcing) agreement whose preamble and clauses flow in from Markdown across pages, ending with the execution date and name-and-seal boxes for both parties. The clauses are generic examples to be adapted to each deal.

  • A4 portrait
  • 10 merge fields
  • Issued as PDF
  • Company names, people, addresses and amounts in the sample are fictional.
  • Clauses and fields are general examples. Review the content against applicable laws and your own terms.
  • The sample layout is in Japanese. You can change any text in the template editor.
Sample of the service agreement template (first page of a PDF issued with DocRelay)

Use cases

  • Outsourcing and maintenance agreements
  • Issuing contract PDFs from a contract management system
  • Contracts with terms tailored to each business partner

Merge fields

The data fields you send to the API. Fields inside an array are shown as array.field.

FieldDescription
titleDocument title (heading and running header)
document_numberContract number
bodyPreamble and clauses in Markdown (article headings, paragraphs, lists)
signed_atDate of execution (YYYY-MM-DD)
party_a.addressParty A (client) address
party_a.nameParty A (client) name
party_a.representativeParty A representative
party_b.addressParty B (contractor) address
party_b.nameParty B (contractor) name
party_b.representativeParty B representative

How to use it

  1. In the dashboard, choose Create template, select "Start from a template" and pick "Service agreement". The layout and sample data are copied into your project.
  2. Edit the company name, logo and field positions in the template editor to match your own format.
  3. Send the template name and data to POST /v1/renders to issue a PDF.

With a test API key (sk_test_) you can issue documents from the draft. Publish a version before issuing with a production API key. From an AI assistant, specify the same template in the from of the MCP create_template tool.

Create and issue via the API

Create a template by setting from to the template ID (outsourcing-contract) in POST /v1/templates, then send the template name and data to POST /v1/renders.

1. Create a template from the ready-made one
curl https://api.docrelay.jp/v1/templates \
  -H "Authorization: Bearer $DOCRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Service agreement", "from": "outsourcing-contract" }'
2. Send data and issue a PDF
curl https://api.docrelay.jp/v1/renders \
  -H "Authorization: Bearer $DOCRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d @outsourcing-contract.json \
  -o outsourcing-contract.pdf
outsourcing-contract.json (sample data; arrays show the first item and long text is shortened)
{
  "template": "Service agreement",
  "format": "pdf",
  "data": {
    "title": "業務委託契約書",
    "document_number": "契約番号 C-2026-0312",
    "signed_at": "2026-11-20",
    "party_a": {
      "address": "東京都千代田区見本町1-2-3",
      "name": "サンプル商事株式会社",
      "representative": "代表取締役 見本 太郎"
    },
    "party_b": {
      "address": "大阪府大阪市北区例示町4-5-6",
      "name": "株式会社見本製作所",
      "representative": "代表取締役 例示 次郎"
    },
    "body": "サンプル商事株式会社(以下「甲」という。)と株式会社見本製作所(以下「乙」という。)は、甲が乙に委託する業務に関し、次の…"
  }
}

API reference

Early access is open

We are preparing for launch. Pre-register and we will notify you when the service becomes available.