---
title: "Create an autorouting rule"
method: POST
path: "/accounting/v1.0/folios/rules"
tags: ["Folio Configuration"]
---

# Create an autorouting rule

`POST /accounting/v1.0/folios/rules`

Create a new autorouting rule for a group profile. The rule defines which transaction types are automatically routed from reservations to a group profile folio.

## Headers

- `X-Property-ID` integer, required

## Request body

- CreateRoutingRuleRequest
  - `sourceId` integer, required — Group Profile ID
  - `sourceKind` 'GROUP_PROFILE' — Deprecated. Defaults to GROUP_PROFILE if not provided.
  - `subSourceId` integer — Allotment Block ID. Null for group-level rules, required for block-level rules.
  - `rules` RoutingRuleEntryRequest[], required — Rule entries. For group-level rules provide exactly one entry (no folioId). For block-level rules provide one entry per target folio.
    - `enabled` boolean, required — Whether this rule entry is enabled
    - `folioId` integer — Target folio ID. Required for block-level rule entries (when the outer subSourceId is set). Must be omitted for group-level rule entries.
    - `routeChildrenTypes` RouteChildrenType[], required — Child transaction types that should follow their parent to the same folio
    - `transactionTypes` RoutingRuleTransactionTypeRequest[], required — Transaction types that this entry routes
      - `externalRelationKind` 'ROOM' | 'PAYMENT' | 'ITEM' | 'ITEM_POS' | 'ADDON' | 'RESERVATION' | 'ACCOUNTS_RECEIVABLE' | 'ROOM_REVENUE' | 'TAX' | 'FEE' | 'ADJUSTMENT' | 'PAYMENT_FEE' | 'BOOKABLE_RESOURCE' | 'CHANNEL_COMMISSION' | 'CITY_LEDGER' | 'GRATUITY' — Kind of the external relation
      - `originId` string — Origin ID for the transaction type (e.g., fee ID, tax ID)

## Response `201`

Created

- RoutingRuleResponse
  - `propertyId` string — Property ID
  - `sourceId` string — Group Profile ID
  - `sourceKind` 'GROUP_PROFILE' — Deprecated. Defaults to GROUP_PROFILE if not provided.
  - `subSourceId` string — Allotment Block ID. Null for group-level rules.
  - `rules` RoutingRuleEntryResponse[] — Rule entries. For group-level rules this contains exactly one entry (no folioId). For block-level rules each entry targets a different folio.
    - `id` string — Rule entry ID
    - `enabled` boolean — Whether this rule entry is enabled
    - `folioId` string — Target folio ID for this entry
    - `routeChildrenTypes` RouteChildrenType[] — Child transaction types that follow their parent to the same folio
    - `transactionTypes` RoutingRuleTransactionTypeResponse[] — Transaction types this entry routes
      - `externalRelationKind` 'ROOM' | 'PAYMENT' | 'ITEM' | 'ITEM_POS' | 'ADDON' | 'RESERVATION' | 'ACCOUNTS_RECEIVABLE' | 'ROOM_REVENUE' | 'TAX' | 'FEE' | 'ADJUSTMENT' | 'PAYMENT_FEE' | 'BOOKABLE_RESOURCE' | 'CHANNEL_COMMISSION' | 'CITY_LEDGER' | 'GRATUITY' — Kind of the external relation
      - `originId` string — Origin ID for the transaction type (e.g., fee ID, tax ID)

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/cloudbeds/apis/cloudbeds-api.md) · [All operations](https://skmtc.net/cloudbeds/apis/cloudbeds-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudbeds/cloudbeds-api/revisions/2faa857793e8/schema)
