# Google Affiliate Network API . advertisers

## Instance Methods

Retrieves data about a single advertiser if that the requesting advertiser/publisher has access to it. Only publishers can lookup advertisers. Advertisers can request information about themselves by omitting the advertiserId query parameter.

Retrieves data about all advertisers that the requesting advertiser/publisher has access to.

Retrieves the next page of results.

### Method Details

`get(role, roleId, advertiserId=None)`

    Retrieves data about a single advertiser if that the requesting advertiser/publisher has access to it. Only publishers can lookup advertisers. Advertisers can request information about themselves by omitting the advertiserId query parameter.

    Args:
      role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
        Allowed values
          advertisers - The requester is requesting as an advertiser.
          publishers - The requester is requesting as a publisher.
      roleId: string, The ID of the requesting advertiser or publisher. (required)
      advertiserId: string, The ID of the advertiser to look up. Optional.

    Returns:
      An object of the form:

        { # An AdvertiserResource.
        "category": "A String", # Category that this advertiser belongs to. A valid list of categories can be found here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581
        "contactEmail": "A String", # Email that this advertiser would like publishers to contact them with.
        "kind": "gan#advertiser", # The kind for an advertiser.
        "siteUrl": "A String", # URL of the website this advertiser advertises from.
        "contactPhone": "A String", # Phone that this advertiser would like publishers to contact them with.
        "description": "A String", # Description of the website the advertiser advertises from.
        "merchantCenterIds": [ # List of merchant center ids for this advertiser
          "A String",
        ],
        "defaultLinkId": "A String", # The default link id for this advertiser.
        "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days. This value should be multiplied by 100 at the time of display.
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "commissionDuration": 42, # The longest possible length of a commission (how long the cookies on the customer's browser last before they expire).
        "status": "A String", # The status of the requesting publisher's relationship this advertiser.
        "payoutRank": "A String", # A rank based on commissions paid to publishers over the past 90 days. A number between 1 and 4 where 4 means the top quartile (most money paid) and 1 means the bottom quartile (least money paid).
        "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months. This value should be multiplied by 100 at the time of display.
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "allowPublisherCreatedLinks": True or False, # True if the advertiser allows publisher created links, otherwise false.
        "item": # Object with schema name: Advertiser # The requested advertiser.
        "joinDate": "A String", # Date that this advertiser was approved as a Google Affiliate Network advertiser.
        "logoUrl": "A String", # URL to the logo this advertiser uses on the Google Affiliate Network.
        "redirectDomains": [ # List of redirect URLs for this advertiser
          "A String",
        ],
        "id": "A String", # The ID of this advertiser.
        "productFeedsEnabled": True or False, # Allows advertisers to submit product listings to Google Product Search.
        "name": "A String", # The name of this advertiser.
      }

`list(role, roleId, relationshipStatus=None, pageToken=None, minNinetyDayEpc=None, advertiserCategory=None, maxResults=None, minSevenDayEpc=None, minPayoutRank=None)`

    Retrieves data about all advertisers that the requesting advertiser/publisher has access to.

    Args:
      role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
        Allowed values
          advertisers - The requester is requesting as an advertiser.
          publishers - The requester is requesting as a publisher.
      roleId: string, The ID of the requesting advertiser or publisher. (required)
      relationshipStatus: string, Filters out all advertisers for which do not have the given relationship status with the requesting publisher.
        Allowed values
          approved - An advertiser that has approved your application.
          available - An advertiser program that's accepting new publishers.
          deactivated - Deactivated means either the advertiser has removed you from their program, or it could also mean that you chose to remove yourself from the advertiser's program.
          declined - An advertiser that did not approve your application.
          pending - An advertiser program that you've already applied to, but they haven't yet decided to approve or decline your application.
      pageToken: string, The value of 'nextPageToken' from the previous page. Optional.
      minNinetyDayEpc: number, Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.
      advertiserCategory: string, Caret(^) delimted list of advertiser categories. Valid categories are defined here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581. Filters out all advertisers not in one of the given advertiser categories. Optional.
      maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.
      minSevenDayEpc: number, Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.
      minPayoutRank: integer, A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included. Optional.

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String", # The 'pageToken' to pass to the next request to get the next page, if there are more to retrieve.
        "items": [ # The advertiser list.
          { # An AdvertiserResource.
            "category": "A String", # Category that this advertiser belongs to. A valid list of categories can be found here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581
            "contactEmail": "A String", # Email that this advertiser would like publishers to contact them with.
            "kind": "gan#advertiser", # The kind for an advertiser.
            "siteUrl": "A String", # URL of the website this advertiser advertises from.
            "contactPhone": "A String", # Phone that this advertiser would like publishers to contact them with.
            "description": "A String", # Description of the website the advertiser advertises from.
            "merchantCenterIds": [ # List of merchant center ids for this advertiser
              "A String",
            ],
            "defaultLinkId": "A String", # The default link id for this advertiser.
            "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days. This value should be multiplied by 100 at the time of display.
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
            "commissionDuration": 42, # The longest possible length of a commission (how long the cookies on the customer's browser last before they expire).
            "status": "A String", # The status of the requesting publisher's relationship this advertiser.
            "payoutRank": "A String", # A rank based on commissions paid to publishers over the past 90 days. A number between 1 and 4 where 4 means the top quartile (most money paid) and 1 means the bottom quartile (least money paid).
            "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months. This value should be multiplied by 100 at the time of display.
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
            "allowPublisherCreatedLinks": True or False, # True if the advertiser allows publisher created links, otherwise false.
            "item": # Object with schema name: Advertiser # The requested advertiser.
            "joinDate": "A String", # Date that this advertiser was approved as a Google Affiliate Network advertiser.
            "logoUrl": "A String", # URL to the logo this advertiser uses on the Google Affiliate Network.
            "redirectDomains": [ # List of redirect URLs for this advertiser
              "A String",
            ],
            "id": "A String", # The ID of this advertiser.
            "productFeedsEnabled": True or False, # Allows advertisers to submit product listings to Google Product Search.
            "name": "A String", # The name of this advertiser.
          },
        ],
        "kind": "gan#advertisers", # The kind for a page of advertisers.
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.