---
title: "Configure document template"
method: POST
path: "/onboarding/v2/templates/{template_id}/configure"
tags: ["Onboarding"]
---

# Configure document template

`POST /onboarding/v2/templates/{template_id}/configure`

## Request

- The document declares no server URL.
- Auth: API key in header `Ocp-Apim-Subscription-Key`

Configure a document template for a country, document type, and business model combination.

## Path parameters

- `template_id` string, required

## Request body

- CustomDocumentTemplateConfigurationRequest
  - `business_model` string: Business model this mapping applies to. Use UNSPECIFIED or omit the field to match any business model. Validations: - Must be one of: b2b, b2c, b2g, unspecified
  - `country_code` string, required: ISO 3166-1 alpha-2 country code (case-insensitive; stored uppercase), or ** to match any country Validations: - Required property - Length ({{.actual}}) must be {{.max}} characters long. - Country code must be ISO 3166-1 alpha-2.
  - `transaction_type` string, required: Transaction type this mapping applies to. Use UNSPECIFIED to match any transaction type. Case-insensitive. Validations: - Required property - Must be a valid transaction type.

## Response `200`

Ok - document template configuration was saved successfully.

- ApiResponseWrapperTemplateConfigurationResponse
  - `data` CustomDocumentTemplateConfigurationResponse
    - `business_model` string: Business model this configuration applies to, or UNSPECIFIED when it applies to any business model
    - `country_code` string: ISO 3166-1 alpha-2 country code, or ** when the configuration applies to any country
    - `created_at` string
    - `id` string: Unique identifier for the document template configuration
    - `template_id` string: Document template identifier
    - `transaction_type` string: Transaction type this configuration applies to, or UNSPECIFIED when it applies to any transaction type
    - `updated_at` string
  - `errors` ErrorResponse[]: List of errors for request. Returns `null` if it is successful.
    - `code` string: Code describing the error.
    - `doc_link` string: The link for the error documentation. Follow it to gather more details about the error
    - `field` string: A validation error can specify the field that generated that error.
    - `message` string: Detailed message containing information on how to resolve the error.
    - `type` string: Type of error: validation, tax_authority, warning, general, unknown.
  - `message` string
  - `status` string: The status of the request.

## Other responses

- `400`: Bad customer request - some of the provided information is incorrect or mandatory data is missing.
- `401`: Authentication failed - missing or incorrect subscription key.
- `404`: Document template with the provided template_id was not found.
- `429`: Too many requests were sent for a short period of time. Try again a bit later.
- `5XX`: Internal server error. Its not you, its us! We are experiencing a rare and unexpected system disruption. Retry again later. The message field of the response will contain more information for the cause. Feel free to contact us.

---

[API](https://skmtc.dev/fonoa/apis/fonoa-e-invoicing.md) - [All operations](https://skmtc.dev/fonoa/apis/fonoa-e-invoicing/llms.txt) - [OpenAPI document](https://skmtc.dev/fonoa/apis/fonoa-e-invoicing/revisions/d38890cb6fcd?raw)
