## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://developer.fabric.inc/llms.txt)

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

This guide explains how to export configuration templates from an existing tenant (for example, sandbox) and apply them to a new tenant (for example, production) using the Order Management System (OMS) APIs. Configuration templates enable standardized onboarding, making it easy to replicate predefined setup entities across environments.

- Enable reusable configuration templates for tenant onboarding.
- Export configuration entities from an existing tenant.
- Import configuration templates into a new tenant through a secure URL.
- Support API-driven onboarding using signed S3-backed template files.
- Enforce 4-hour access control for template URLs.
- Track template metadata & status.

The scope is limited to onboarding only. Features such as versioning, rollback, or diff support are not included.

## Supported Configuration Entities

A template can include one or more of the following entities:

- `configs`
- `rules`
- `zones`
- `networks`
- `geos`
- `attributes`
- `counters`
- `targetConfigs`
- `ppsConfigs`
- `holdConfigs`

## Step 1: Create and Export the Configuration Template

Use the `actions/export` endpoint to generate a new configuration template.

```
curl --location '{{api_base_path}}/v3/configuration-templates/actions/export' \
--header 'X-Fabric-Tenant-Id: {{tenant_id}}' \
--header 'X-Fabric-Channel-Id: {{channel_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
  "entityTypes": ["networks"]
}'
```

**Sample Response:**

```
{
  "templateId": "template_2025-08-07T16-05-14-320205620Z",
  "entityTypes": ["networks"],
  "status": "INITIATED",
  "downloadUrl": null,
  "createdAt": "2025-08-07T16:05:14Z",
  "updatedAt": "2025-08-07T16:05:14Z"
}
```

## Step 2: Check the Export Status

Check the status until it reaches `FINISHED`.

```
curl --location '{{api_base_path}}/v3/configuration-templates/{{template_id}}/actions/export-status' \
--header 'X-Fabric-Tenant-Id: {{tenant_id}}' \
--header 'X-Fabric-Channel-Id: {{channel_id}}' \
--header 'Authorization: Bearer {{access_token}}'
```

**Sample Response:**

```
{
  "templateId": "template_2025-08-07T16-05-14-320205620Z",
  "entityTypes": ["configs", "rules"],
  "status": "FINISHED",
  "downloadUrl": "https://<signed_s3_url>?X-Amz-SignedHeaders=...",
  "createdAt": "2025-08-07T16:05:14Z",
  "updatedAt": "2025-08-07T16:05:32Z"
}
```

Copy the `downloadUrl` to use in the next step.

## Step 3: Send the Template to your Production Tenant

Use the `downloadUrl` as the `<S3_URL>` value to configure your production account.

```
curl --location '{{api_base_path}}/v3/organizations/{{orgId}}/tenants' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "testtenant1",
    "requesterFirstName": "<first_name>",
    "requesterLastName": "<last_name>",
    "configurations": {
        "OMS": {
            "omsTemplateFileUrl": "<S3_URL>"
        }
    }
}'
```

**Sample Response:** A successful response returns a `200 OK` status. Once complete, you must wait for the import to finish which can take up to 10 minutes. You can confirm if the import was successful by checking the UI or using an API GET endpoint for one of your configurations. For example, if you imported geography configurations, you can use the [/v3/location-geographies/search](https://developer.fabric.inc/v3/orders-and-inventory/api-reference/inventory/locations/geography/search) endpoint to make a POST request and review your data.

### Notes on Expiry & Reusability

- The `downloadUrl` expires **4 hours** after creation.
- To refresh, call the **export-status** endpoint again.
- Templates are **stateless** and may be reused until expiry.
