google-ads-api

Google Ads API, campaign status integer?


I'm using the Google Ads API, and with the docs about the status: https://developers.google.com/google-ads/api/reference/rpc/v17/CampaignStatusEnum.CampaignStatus

It show that is a ENUM with string values. But when I do the query:

 SELECT
                    campaign.id,
                    campaign.name,
                    campaign.status,
                    campaign.start_date,
                    campaign.end_date
                FROM campaign
                ORDER BY campaign.name

the status show a number between 1 and 4 (at least that numbers I see, idk if is more options).

Any have a documentation about what means each number? or if i'm missing something in the query to get string enum?

Thanks


Solution

  • I found it.

    //Google\Ads\GoogleAds\V17\Enums\CampaignStatusEnum\CampaignStatus;
    
    class CampaignStatus
    {
        const UNSPECIFIED = 0;
        const UNKNOWN = 1;
        const ENABLED = 2;
        const PAUSED = 3;
        const REMOVED = 4;
    
    .....
    }