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

# Update an autorouting rule

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

## Request

- Base URL: `https://api.cloudbeds.com`
- URL: `https://api.cloudbeds.com/accounting/v1.0/folios/rules`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Implicit: `https://hotels.cloudbeds.com/api/v1.2/oauth`

Update or create autorouting rules for a group profile. Entries with an id are updated; entries without an id are created as new rules.

## Headers

- `X-Property-ID` integer, required

## Request body

- UpdateRoutingRuleRequest
  - `sourceId` integer: Group Profile ID. Required when any entry in the rules array omits an id (i.e. is a new entry to create).
  - `sourceKind` 'GROUP_PROFILE': Deprecated. Defaults to GROUP_PROFILE if not provided.
  - `subSourceId` integer: Allotment Block ID. Required for block-level rules when creating new entries.
  - `rules` UpdateRoutingRuleEntryRequest[], required: Rule entries to create or update. Entries with an id are updated; entries without an id are created as new rules.
    - `id` integer: ID of the rule entry to update. When omitted, a new rule entry is created (sourceId and subSourceId must be provided on the parent request in that case).
    - `enabled` boolean, required: Whether this rule entry is enabled
    - `folioId` integer: Target folio ID. For block-level rules only. When omitted the existing folio is preserved (partial-update semantics).
    - `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' | 'CHECK_ITEM' | 'CHECK_SERVICE_CHARGE' | 'CHECK_DISCOUNT' | 'CHANNEL_COMMISSION_MANUAL': Kind of the external relation
      - `originId` string: Origin ID for the transaction type (e.g., fee ID, tax ID)

## Response `200`

OK

- 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' | 'CHECK_ITEM' | 'CHECK_SERVICE_CHARGE' | 'CHECK_DISCOUNT' | 'CHANNEL_COMMISSION_MANUAL': Kind of the external relation
      - `originId` string: Origin ID for the transaction type (e.g., fee ID, tax ID)

## Other responses

- `400`: Bad Request
- `404`: Not found

---

[API](https://skmtc.dev/cloudbeds/apis/accounting-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/accounting-api/revisions/0b58c698deef?raw)
