---
title: Rule
framework: Apple Ads Platform API
role: symbol
role_heading: Object
platforms: [apple ads platform api 1.0+]
path: apple-ads-platform-api/rule
---

# Rule

A single filter rule for a dynamic location group.

## Declaration

```data
object Rule
```

## Properties

field: The location attribute to filter on. Values: adminArea (state or province name, for example, "California"), locality (city or locality, formatted as countryOrRegion|adminArea|locality, for example, "US|New York|Brooklyn"), postalCode (postal code, for example, "94107"), locationId (location ID, for example, "7205759403792794"). Cannot be null. operator: Comparison operator to apply against field. Cannot be null. value: The value to match against. Pass a string for EQUALS and NOT_EQUALS. Pass an array of strings for IN and NOT_IN.

## Discussion

Discussion The Rule object defines a filter for a DYNAMIC LocationGroup, specifying how the system selects locations at query time. Rules can mix different field values within the same group, and the system re-evaluates location membership whenever rules change, setting LocationGroup.systemStatus to PENDING until evaluation completes. Example {   "field": "adminArea",   "operator": "IN",   "value": ["California", "New York"] }

## Topics

### Dictionaries

- [Rule.Value](apple-ads-platform-api/rule/value-data.dictionary.md)

## See Also

- [Brand](apple-ads-platform-api/brand.md)
- [BrandResponse](apple-ads-platform-api/brandresponse.md)
- [BrandQueryResponse](apple-ads-platform-api/brandqueryresponse.md)
- [BrandRejectionReasonResponse](apple-ads-platform-api/brandrejectionreasonresponse.md)
- [BusinessCategory](apple-ads-platform-api/businesscategory.md)
- [BusinessCategoryResponse](apple-ads-platform-api/businesscategoryresponse.md)
- [BusinessCategoryQueryResponse](apple-ads-platform-api/businesscategoryqueryresponse.md)
- [Location](apple-ads-platform-api/location.md)
- [LocationResponse](apple-ads-platform-api/locationresponse.md)
- [LocationGroup](apple-ads-platform-api/locationgroup.md)
- [LocationGroupCreate](apple-ads-platform-api/locationgroupcreate.md)
- [LocationGroupUpdate](apple-ads-platform-api/locationgroupupdate.md)
- [LocationGroupResponse](apple-ads-platform-api/locationgroupresponse.md)
- [LocationGroupQueryResponse](apple-ads-platform-api/locationgroupqueryresponse.md)
- [LocationQueryResponse](apple-ads-platform-api/locationqueryresponse.md)
