Showing posts with label Status. Show all posts
Showing posts with label Status. Show all posts

Understanding various status codes

Thursday, January 27, 2011



In the AdWords API, entities may have different values for the same status.  For instance, when you delete a campaign the status will be set to DELETED . But when you delete an  AdGroupAd object, the status will be DISABLED.

campaign.setStatus(CampaignStatus.DELETED);
operation.setOperator(Operator.SET);
campaignService.mutate(operations);

adGroupAd.setStatus(AdGroupAdStatus.DISABLED);
operation.setOperator(Operator.SET);
adGroupAdService.mutate(operations);

The following table shows the statuses available for each type, as well as the operation needed to change the status.  (Note: Some objects have more than one status field, but in this case we are only showing the user status.)

Type
Newly Added
Enable/ Active
Paused
Delete / Deactivated
action : mutate
operation: ADD
status : ACTIVE
action : mutate
operation: SET
status : ACTIVE
action : mutate
operation: SET
status: PAUSED
action : mutate
operation : SET
status: DELETED
action: mutate
operation: ADD
status: ENABLED
action : mutate
operation: SET
status : ENABLED
action: mutate
operation: SET
status : PAUSED
action : mutate
operation: SET
status: DELETED
action : mutate
operation: ADD
status: ENABLED
action : mutate
operation : SET
status : ENABLED
action : mutate
operation : SET
status : PAUSED
action: mutate
operation : REMOVE
status: DISABLED
action: mutate
operation: ADD
status: ACTIVE
action: mutate
operation: SET
status: ACTIVE
action: mutate
operation: SET
status: PAUSED
action: mutate
operation: REMOVE
status: DELETED
action: mutate
operation: ADD
status: ACTIVE
N/A
N/A
action: mutate
operation: REMOVE
status: DELETED
action:mutate
operation: ADD
status: ACTIVE
N/A
N/A
action: mutate
operation: SET
status: DELETED
action: mutate
operation: ADD
status: OPEN
N/A
N/A
action: mutate
operation: SET
status: CLOSED
action: mutate
operation: ADD
status: ACTIVE
N/A
N/A
action: mutate
operation: SET
status: DELETED


You can see code examples demonstrating how to use statuses in our client libraries. If you have any questions please post them on the AdWords API forum.

- Naoki Ishihara, AdWords API Team