> Portal Navigation:
>
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt
# Resource: Rules
# Type: Rule Object
# Link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/service-fees/rules/rule-object.md
## Description: A rule defines the fee that is applied when specific conditions (also defined by the rule) are met. You can use a rule to apply a service fee to a restaurant order.
## Schema:
```json
Type: Rule Object | type: Rule
Description: A rule defines the fee that is applied when specific conditions (also defined by the rule) are met. You can use a rule to apply a service fee to a restaurant order.
- name: id | type: string | description: Rule ID.
- name: value | type: string | description:
- name: locationId | type: string | description: Business location ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations.md)) of the rule.
- name: name | type: string | description: Rule name.
- name: createdDate | type: string | description: Date and time the rule was created.
- name: seconds | type: string | description:
- name: nanos | type: number | description:
- name: updatedDate | type: string | description: Date and time the rule was updated.
- name: taxRate | type: string | description: Percentage value to apply as a custom tax rate. For example, `5` represents a 5% fee applied to the order's total.
Min: '0'.
Max: `100`.
- name: conditionsType | type: string | description: Specifies the type of condition.
enum: NO_CONDITIONS, CONDITION, CONDITION_TREE
- name: conditionType | type: string | description: Specifies the type of condition.
enum: UNDEFINED_CONDITION_TYPE, CONDITION, CONDITION_TREE
- name: enabled | type: boolean | description: Whether the rule is enabled. If `true`, the rule is evaluated when service fees are calculated. If `false`, the rule will not be evaluated when service fees are calculated.
- name: value | type: boolean | description:
- name: revision | type: string | description: Revision number. Increments by 1 each time the rule is updated. To prevent conflicting changes, the existing `revision` must be used when updating a rule.
- name: value | type: number | description:
- name: label | type: string | description: DEPRECATED. Defines the app that the rule is connected to.
- name: appId | type: string | description: Defines the app that the rule is connected to.
- name: roundingStrategy | type: string | description: Rounding strategy to apply to fee and tax calculation.
enum: HALF_UP, HALF_EVEN
- name: extendedFields | type: ExtendedFields | description: Data Extensions
- name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
- name: tags | type: Tags | description: Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction.md)) used to classify and sort different types of rules.
- name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.
- name: tagIds | type: Array | description: List of tag IDs
- name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.
```