그래프 API 버전

Ad Rule

읽기

A Rule that will be triggered based on certain criteria defined on ad objects, and perform custom actions.

매개변수

이 엔드포인트는 매개변수가 없습니다.

필드

필드설명
id
numeric string

ID of the rule

account_id
numeric string

ID of the ad account that owns the rule

created_by

The user who created the rule

created_time
datetime

Time when the rule was created

disable_error_code
int32

error_code explaining why this rule is disabled with issues

name
string

The friendly name of a rule, optional for inline rules

schedule_spec

Specifies the schedule with which a rule will be evaluated

status
string

The status of a rule

updated_time
datetime

The time when the rule was last updated.

에지

Edge설명
Edge<AdRuleHistory>

The execution history associated with this rule. Each entry represents a distinct run of the rule and provides any actions that may have been taken on any ad objects.

오류 코드

오류설명
80004There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management.
200Permissions error

만들기

다음 경로에서 adrules_library 에지에 POST 요청을 만들 수 있습니다:
이 에지에 게시할 때 an AdRule이(가) 생성됩니다.

매개변수

매개변수설명
account_id
numeric string

Ad Account ID. This is inferred from the path.

evaluation_spec
Object

Defines the evaluation spec upon which a rule will be executed

필수
evaluation_type
enum{SCHEDULE, TRIGGER}

필수
filters
list<Object>

필수
field
string

필수
value
numeric, string, boolean, list<>, or object-like arrays

필수
operator
enum{GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, IN_RANGE, NOT_IN_RANGE, IN, NOT_IN, CONTAIN, NOT_CONTAIN, ANY, ALL, NONE}

필수
trigger
Object

type
enum{METADATA_CREATION, METADATA_UPDATE, STATS_MILESTONE, STATS_CHANGE, DELIVERY_INSIGHTS_CHANGE}

필수
field
string

value
numeric, string, boolean, list<>, or object-like arrays

operator
enum{GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, IN_RANGE, NOT_IN_RANGE, IN, NOT_IN, CONTAIN, NOT_CONTAIN, ANY, ALL, NONE}

execution_spec
Object

Defines the execution spec upon which a rule will be executed

필수
execution_type
enum{DCO, PING_ENDPOINT, NOTIFICATION, PAUSE, REBALANCE_BUDGET, CHANGE_BUDGET, CHANGE_BID, ROTATE, UNPAUSE, CHANGE_CAMPAIGN_BUDGET, ADD_INTEREST_RELAXATION, ADD_QUESTIONNAIRE_INTERESTS, INCREASE_RADIUS, UPDATE_CREATIVE, UPDATE_LAX_BUDGET, UPDATE_LAX_DURATION, AUDIENCE_CONSOLIDATION, AUDIENCE_CONSOLIDATION_ASK_FIRST, AD_RECOMMENDATION_APPLY}

필수
execution_options
list<Object>

field
string

필수
value
numeric, string, boolean, list<>, or object-like arrays

필수
operator
enum{EQUAL, IN}

필수
name
string

The friendly name of a rule, optional for inline rules

필수
schedule_spec
Object

Specifies the schedule with which a rule will be evaluated

schedule_type
enum{DAILY, HOURLY, SEMI_HOURLY, CUSTOM}

필수
schedule
list<Object>

start_minute
int64

end_minute
int64

days
list<int64>

status
enum {ENABLED, DISABLED, DELETED, HAS_ISSUES}

The status of a rule

반환 유형

이 엔드포인트는 기록 후 읽기를 지원하며 반환 유형에서 id로 표시되는 노드를 읽습니다.
Struct {
id: numeric string,
}

오류 코드

오류설명
200Permissions error
100Invalid parameter
368The action attempted has been deemed abusive or is otherwise disallowed
2703Rules that turn off ads can't have cost conditions. You need to change the rule's conditions or action.
190Invalid OAuth 2.0 Access Token

업데이트 중

/{ad_rule_id}에 POST 요청을 하여 an AdRule을(를) 업데이트할 수 있습니다.

매개변수

매개변수설명
evaluation_spec
Object

Defines the evaluation spec upon which a rule will be executed

evaluation_type
enum{SCHEDULE, TRIGGER}

필수
filters
list<Object>

필수
field
string

필수
value
numeric, string, boolean, list<>, or object-like arrays

필수
operator
enum{GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, IN_RANGE, NOT_IN_RANGE, IN, NOT_IN, CONTAIN, NOT_CONTAIN, ANY, ALL, NONE}

필수
trigger
Object

type
enum{METADATA_CREATION, METADATA_UPDATE, STATS_MILESTONE, STATS_CHANGE, DELIVERY_INSIGHTS_CHANGE}

필수
field
string

value
numeric, string, boolean, list<>, or object-like arrays

operator
enum{GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, IN_RANGE, NOT_IN_RANGE, IN, NOT_IN, CONTAIN, NOT_CONTAIN, ANY, ALL, NONE}

execution_spec
Object

Defines the execution spec upon which a rule will be executed

execution_type
enum{DCO, PING_ENDPOINT, NOTIFICATION, PAUSE, REBALANCE_BUDGET, CHANGE_BUDGET, CHANGE_BID, ROTATE, UNPAUSE, CHANGE_CAMPAIGN_BUDGET, ADD_INTEREST_RELAXATION, ADD_QUESTIONNAIRE_INTERESTS, INCREASE_RADIUS, UPDATE_CREATIVE, UPDATE_LAX_BUDGET, UPDATE_LAX_DURATION, AUDIENCE_CONSOLIDATION, AUDIENCE_CONSOLIDATION_ASK_FIRST, AD_RECOMMENDATION_APPLY}

필수
execution_options
list<Object>

field
string

필수
value
numeric, string, boolean, list<>, or object-like arrays

필수
operator
enum{EQUAL, IN}

필수
name
string

The friendly name of a rule, optional for inline rules

schedule_spec
Object

Specifies the schedule with which a rule will be evaluated

schedule_type
enum{DAILY, HOURLY, SEMI_HOURLY, CUSTOM}

필수
schedule
list<Object>

start_minute
int64

end_minute
int64

days
list<int64>

status
enum {ENABLED, DISABLED, DELETED, HAS_ISSUES}

The status of a rule

반환 유형

이 엔드포인트는 기록 후 읽기 기능을 지원하며 회원님이 게시한 노드를 읽습니다.
Struct {
success: bool,
}

오류 코드

오류설명
100Invalid parameter
200Permissions error
190Invalid OAuth 2.0 Access Token
2703Rules that turn off ads can't have cost conditions. You need to change the rule's conditions or action.
368The action attempted has been deemed abusive or is otherwise disallowed

삭제 중

/{ad_rule_id}에 DELETE 요청을 만들어 an AdRule을(를) 삭제할 수 있습니다.

매개변수

이 엔드포인트는 매개변수가 없습니다.

반환 유형

Struct {
success: bool,
}

오류 코드

오류설명
368The action attempted has been deemed abusive or is otherwise disallowed
200Permissions error
100Invalid parameter
190Invalid OAuth 2.0 Access Token
80004There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management.