blob: cd7bb009db36bec0d072af8d82c36a86275ac62a [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="partners_v2.html">Google Partners API</a> . <a href="partners_v2.users.html">users</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070078 <code><a href="#createCompanyRelation">createCompanyRelation(userId, body, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline">Creates a user's company relation. Affiliates the user to a company.</p>
80<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#deleteCompanyRelation">deleteCompanyRelation(userId, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040082<p class="firstline">Deletes a user's company relation. Unaffiliaites the user from a company.</p>
83<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#get">get(userId, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, userView=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Gets a user.</p>
86<p class="toc_element">
87 <code><a href="#updateProfile">updateProfile(body, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</a></code></p>
88<p class="firstline">Updates a user's profile. A user can only update their own profile and</p>
89<h3>Method Details</h3>
90<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -070091 <code class="details" id="createCompanyRelation">createCompanyRelation(userId, body, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040092 <pre>Creates a user's company relation. Affiliates the user to a company.
93
94Args:
95 userId: string, The ID of the user. Can be set to <code>me</code> to mean
96the currently authenticated user. (required)
97 body: object, The request body. (required)
98 The object takes the form of:
99
100{ # A CompanyRelation resource representing information about a user's
101 # affiliation and standing with a company in Partners.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 "website": "A String", # The website URL for this company.
Thomas Coffee2f245372017-03-27 10:39:26 -0700103 "managerAccount": "A String", # The AdWords manager account # associated this company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104 "specializationStatus": [ # The list of Google Partners specialization statuses for the company.
105 { # Agency specialization status
106 "badgeSpecialization": "A String", # The specialization this status is for.
107 "badgeSpecializationState": "A String", # State of agency specialization.
108 },
109 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700110 "companyId": "A String", # The ID of the company. There may be no id if this is a
111 # pending company.5
112 "isPending": True or False, # The flag that indicates if the company is pending verification.
113 "address": "A String", # The primary address for this company.
114 "creationTime": "A String", # The timestamp of when affiliation was requested.
115 # @OutputOnly
116 "companyAdmin": True or False, # Indicates if the user is an admin for this company.
117 "badgeTier": "A String", # Whether the company is a Partner.
118 "state": "A String", # The state of relationship, in terms of approvals.
119 "phoneNumber": "A String", # The phone number for the company's primary address.
120 "logoUrl": "A String", # A URL to a profile photo, e.g. a G+ profile photo.
121 "resolvedTimestamp": "A String", # The timestamp when the user was approved.
122 # @OutputOnly
123 "segment": [ # The segment the company is classified as.
124 "A String",
125 ],
126 "name": "A String", # The name (in the company's primary language) for the company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 }
128
129 requestMetadata_userOverrides_ipAddress: string, IP address to use instead of the user's geo-located IP address.
130 requestMetadata_trafficSource_trafficSubId: string, Second level identifier to indicate where the traffic comes from.
131An identifier has multiple letters created by a team which redirected the
132traffic to us.
133 requestMetadata_userOverrides_userId: string, Logged-in user ID to impersonate instead of the user's ID.
134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
138 requestMetadata_locale: string, Locale to use for the current request.
139 requestMetadata_experimentIds: string, Experiment IDs the current request belongs to. (repeated)
140 requestMetadata_trafficSource_trafficSourceId: string, Identifier to indicate where the traffic comes from.
141An identifier has multiple letters created by a team which redirected the
142traffic to us.
143 requestMetadata_partnersSessionId: string, Google Partners session ID.
144
145Returns:
146 An object of the form:
147
148 { # A CompanyRelation resource representing information about a user's
149 # affiliation and standing with a company in Partners.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 "website": "A String", # The website URL for this company.
Thomas Coffee2f245372017-03-27 10:39:26 -0700151 "managerAccount": "A String", # The AdWords manager account # associated this company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400152 "specializationStatus": [ # The list of Google Partners specialization statuses for the company.
153 { # Agency specialization status
154 "badgeSpecialization": "A String", # The specialization this status is for.
155 "badgeSpecializationState": "A String", # State of agency specialization.
156 },
157 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700158 "companyId": "A String", # The ID of the company. There may be no id if this is a
159 # pending company.5
160 "isPending": True or False, # The flag that indicates if the company is pending verification.
161 "address": "A String", # The primary address for this company.
162 "creationTime": "A String", # The timestamp of when affiliation was requested.
163 # @OutputOnly
164 "companyAdmin": True or False, # Indicates if the user is an admin for this company.
165 "badgeTier": "A String", # Whether the company is a Partner.
166 "state": "A String", # The state of relationship, in terms of approvals.
167 "phoneNumber": "A String", # The phone number for the company's primary address.
168 "logoUrl": "A String", # A URL to a profile photo, e.g. a G+ profile photo.
169 "resolvedTimestamp": "A String", # The timestamp when the user was approved.
170 # @OutputOnly
171 "segment": [ # The segment the company is classified as.
172 "A String",
173 ],
174 "name": "A String", # The name (in the company's primary language) for the company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400175 }</pre>
176</div>
177
178<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700179 <code class="details" id="deleteCompanyRelation">deleteCompanyRelation(userId, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400180 <pre>Deletes a user's company relation. Unaffiliaites the user from a company.
181
182Args:
183 userId: string, The ID of the user. Can be set to <code>me</code> to mean
184the currently authenticated user. (required)
185 requestMetadata_userOverrides_ipAddress: string, IP address to use instead of the user's geo-located IP address.
186 requestMetadata_trafficSource_trafficSubId: string, Second level identifier to indicate where the traffic comes from.
187An identifier has multiple letters created by a team which redirected the
188traffic to us.
189 requestMetadata_userOverrides_userId: string, Logged-in user ID to impersonate instead of the user's ID.
190 x__xgafv: string, V1 error format.
191 Allowed values
192 1 - v1 error format
193 2 - v2 error format
194 requestMetadata_locale: string, Locale to use for the current request.
195 requestMetadata_experimentIds: string, Experiment IDs the current request belongs to. (repeated)
196 requestMetadata_trafficSource_trafficSourceId: string, Identifier to indicate where the traffic comes from.
197An identifier has multiple letters created by a team which redirected the
198traffic to us.
199 requestMetadata_partnersSessionId: string, Google Partners session ID.
200
201Returns:
202 An object of the form:
203
204 { # A generic empty message that you can re-use to avoid defining duplicated
205 # empty messages in your APIs. A typical example is to use it as the request
206 # or the response type of an API method. For instance:
207 #
208 # service Foo {
209 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
210 # }
211 #
212 # The JSON representation for `Empty` is empty JSON object `{}`.
213 }</pre>
214</div>
215
216<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700217 <code class="details" id="get">get(userId, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, userView=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400218 <pre>Gets a user.
219
220Args:
221 userId: string, Identifier of the user. Can be set to <code>me</code> to mean the currently
222authenticated user. (required)
223 requestMetadata_userOverrides_ipAddress: string, IP address to use instead of the user's geo-located IP address.
224 requestMetadata_trafficSource_trafficSubId: string, Second level identifier to indicate where the traffic comes from.
225An identifier has multiple letters created by a team which redirected the
226traffic to us.
227 requestMetadata_userOverrides_userId: string, Logged-in user ID to impersonate instead of the user's ID.
228 x__xgafv: string, V1 error format.
229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
232 requestMetadata_locale: string, Locale to use for the current request.
233 userView: string, Specifies what parts of the user information to return.
234 requestMetadata_experimentIds: string, Experiment IDs the current request belongs to. (repeated)
235 requestMetadata_trafficSource_trafficSourceId: string, Identifier to indicate where the traffic comes from.
236An identifier has multiple letters created by a team which redirected the
237traffic to us.
238 requestMetadata_partnersSessionId: string, Google Partners session ID.
239
240Returns:
241 An object of the form:
242
243 { # A resource representing a user of the Partners platform.
Thomas Coffee2f245372017-03-27 10:39:26 -0700244 "companyVerificationEmail": "A String", # The email address used by the user used for company verification.
245 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 "profile": { # The profile information of a Partners user. # The profile information of a Partners user, contains all the directly
247 # editable user information.
248 "industries": [ # A list of ids representing which industries the user selected.
249 "A String",
250 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700251 "primaryCountryCode": "A String", # The user's primary country, an ISO 2-character code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700252 "adwordsManagerAccount": "A String", # If the user has edit access to multiple accounts, the user can choose the
253 # preferred account and it is used when a personal account is needed. Can
254 # be empty.
Thomas Coffee2f245372017-03-27 10:39:26 -0700255 "languages": [ # The list of languages this user understands.
256 "A String",
257 ],
258 "jobFunctions": [ # A list of ids represnting which job categories the user selected.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400259 "A String",
260 ],
261 "emailOptIns": { # A set of opt-ins for a user. # The list of opt-ins for the user, related to communication preferences.
262 "specialOffers": True or False, # An opt-in about receiving email regarding new features and products.
263 "marketComm": True or False, # An opt-in about receiving email from Partners marketing teams. Includes
264 # member-only events and special promotional offers for Google products.
265 "phoneContact": True or False, # An opt-in to allow recieivng phone calls about their Partners account.
266 "physicalMail": True or False, # An opt-in to receive special promotional gifts and material in the mail.
267 "performanceSuggestions": True or False, # An opt-in about receiving email with customized AdWords campaign management
268 # tips.
269 },
270 "familyName": "A String", # The user's family name.
271 "channels": [ # A list of ids representing which channels the user selected they were in.
272 "A String",
273 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700274 "emailAddress": "A String", # The email address the user has selected on the Partners site as primary.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400275 "address": { # A location with address and geographic coordinates. May optionally contain a # The user's mailing address, contains multiple fields.
276 # detailed (multi-field) version of the address.
277 "languageCode": "A String", # Language code of the address. Should be in BCP 47 format.
278 "addressLine": [ # The following address lines represent the most specific part of any
279 # address.
280 "A String",
281 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700282 "locality": "A String", # Generally refers to the city/town portion of an address.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400283 "sortingCode": "A String", # Use of this code is very country-specific, but will refer to a secondary
284 # classification code for sorting mail.
285 "latLng": { # An object representing a latitude/longitude pair. This is expressed as a pair # The latitude and longitude of the location, in degrees.
286 # of doubles representing degrees latitude and degrees longitude. Unless
287 # specified otherwise, this must conform to the
288 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
289 # standard</a>. Values must be within normalized ranges.
290 #
291 # Example of normalization code in Python:
292 #
293 # def NormalizeLongitude(longitude):
294 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
295 # q, r = divmod(longitude, 360.0)
296 # if r > 180.0 or (r == 180.0 and q <= -1.0):
297 # return r - 360.0
298 # return r
299 #
300 # def NormalizeLatLng(latitude, longitude):
301 # """Wraps decimal degrees latitude and longitude to
302 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
303 # r = latitude % 360.0
304 # if r <= 90.0:
305 # return r, NormalizeLongitude(longitude)
306 # elif r >= 270.0:
307 # return r - 360, NormalizeLongitude(longitude)
308 # else:
309 # return 180 - r, NormalizeLongitude(longitude + 180.0)
310 #
311 # assert 180.0 == NormalizeLongitude(180.0)
312 # assert -180.0 == NormalizeLongitude(-180.0)
313 # assert -179.0 == NormalizeLongitude(181.0)
314 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
315 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
316 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
317 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
318 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
319 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
320 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
321 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
322 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
323 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
324 #
325 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
326 # as if it were annotated as ST_LOCATION.
327 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
328 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
329 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700330 "dependentLocality": "A String", # Dependent locality or sublocality. Used for UK dependent localities, or
331 # neighborhoods or boroughs in other locations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400332 "regionCode": "A String", # CLDR (Common Locale Data Repository) region code .
333 "administrativeArea": "A String", # Top-level administrative subdivision of this country.
334 "address": "A String", # The single string version of the address.
335 "postalCode": "A String", # Values are frequently alphanumeric.
336 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700337 "phoneNumber": "A String", # The user's phone number.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400338 "givenName": "A String", # The user's given name.
Thomas Coffee2f245372017-03-27 10:39:26 -0700339 "markets": [ # A list of ids representing which markets the user was interested in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400340 "A String",
341 ],
342 "profilePublic": True or False, # Whether the user's public profile is visible to anyone with the URL.
343 },
344 "certificationStatus": [ # The list of achieved certifications. These are calculated based on exam
345 # results and other requirements.
346 # @OutputOnly
347 { # A user's information on a specific certification.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700348 "warning": True or False, # Whether this certification is in the state of warning.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700349 "certificationType": "A String", # The type of certification, the area of expertise.
Thomas Coffee2f245372017-03-27 10:39:26 -0700350 "lastAchieved": "A String", # The date the user last achieved certification.
351 "expiration": "A String", # Date this certification is due to expire.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400352 "achieved": True or False, # Whether this certification has been achieved.
353 },
354 ],
355 "availableAdwordsManagerAccounts": [ # This is the list of AdWords Manager Accounts the user has edit access to.
356 # If the user has edit access to multiple accounts, the user can choose the
357 # preferred account and we use this when a personal account is needed. Can
358 # be empty meaning the user has access to no accounts.
359 # @OutputOnly
360 { # Information about a particular AdWords Manager Account.
361 # Read more at https://support.google.com/adwords/answer/6139186
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700362 "customerName": "A String", # Name of the customer this account represents.
Thomas Coffee2f245372017-03-27 10:39:26 -0700363 "id": "A String", # The AdWords Manager Account id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400364 },
365 ],
366 "company": { # A CompanyRelation resource representing information about a user's # The company that the user is associated with.
367 # If not present, the user is not associated with any company.
368 # affiliation and standing with a company in Partners.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400369 "website": "A String", # The website URL for this company.
Thomas Coffee2f245372017-03-27 10:39:26 -0700370 "managerAccount": "A String", # The AdWords manager account # associated this company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400371 "specializationStatus": [ # The list of Google Partners specialization statuses for the company.
372 { # Agency specialization status
373 "badgeSpecialization": "A String", # The specialization this status is for.
374 "badgeSpecializationState": "A String", # State of agency specialization.
375 },
376 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700377 "companyId": "A String", # The ID of the company. There may be no id if this is a
378 # pending company.5
379 "isPending": True or False, # The flag that indicates if the company is pending verification.
380 "address": "A String", # The primary address for this company.
381 "creationTime": "A String", # The timestamp of when affiliation was requested.
382 # @OutputOnly
383 "companyAdmin": True or False, # Indicates if the user is an admin for this company.
384 "badgeTier": "A String", # Whether the company is a Partner.
385 "state": "A String", # The state of relationship, in terms of approvals.
386 "phoneNumber": "A String", # The phone number for the company's primary address.
387 "logoUrl": "A String", # A URL to a profile photo, e.g. a G+ profile photo.
388 "resolvedTimestamp": "A String", # The timestamp when the user was approved.
389 # @OutputOnly
390 "segment": [ # The segment the company is classified as.
391 "A String",
392 ],
393 "name": "A String", # The name (in the company's primary language) for the company.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400394 },
395 "lastAccessTime": "A String", # The most recent time the user interacted with the Partners site.
396 # @OutputOnly
397 "primaryEmails": [ # The list of emails the user has access to/can select as primary.
398 # @OutputOnly
399 "A String",
400 ],
401 "id": "A String", # The ID of the user.
402 "publicProfile": { # Basic information from a public profile. # Information about a user's external public profile outside Google Partners.
403 "url": "A String", # The URL of the public profile.
404 "profileImage": "A String", # The URL to the main profile image of the public profile.
405 "displayImageUrl": "A String", # The URL to the main display image of the public profile. Being deprecated.
406 "displayName": "A String", # The display name of the public profile.
407 "id": "A String", # The ID which can be used to retrieve more details about the public profile.
408 },
409 "examStatus": [ # The list of exams the user ever taken. For each type of exam, only one
410 # entry is listed.
411 { # A user's information on a specific exam.
412 "examType": "A String", # The type of the exam.
413 "warning": True or False, # Whether this exam is in the state of warning.
414 "expiration": "A String", # Date this exam is due to expire.
415 "passed": True or False, # Whether this exam has been passed and not expired.
416 "taken": "A String", # The date the user last taken this exam.
417 "lastPassed": "A String", # The date the user last passed this exam.
418 },
419 ],
420 }</pre>
421</div>
422
423<div class="method">
424 <code class="details" id="updateProfile">updateProfile(body, requestMetadata_userOverrides_ipAddress=None, requestMetadata_trafficSource_trafficSubId=None, requestMetadata_userOverrides_userId=None, x__xgafv=None, requestMetadata_locale=None, requestMetadata_experimentIds=None, requestMetadata_trafficSource_trafficSourceId=None, requestMetadata_partnersSessionId=None)</code>
425 <pre>Updates a user's profile. A user can only update their own profile and
426should only be called within the context of a logged in user.
427
428Args:
429 body: object, The request body. (required)
430 The object takes the form of:
431
432{ # The profile information of a Partners user.
433 "industries": [ # A list of ids representing which industries the user selected.
434 "A String",
435 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700436 "primaryCountryCode": "A String", # The user's primary country, an ISO 2-character code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700437 "adwordsManagerAccount": "A String", # If the user has edit access to multiple accounts, the user can choose the
438 # preferred account and it is used when a personal account is needed. Can
439 # be empty.
Thomas Coffee2f245372017-03-27 10:39:26 -0700440 "languages": [ # The list of languages this user understands.
441 "A String",
442 ],
443 "jobFunctions": [ # A list of ids represnting which job categories the user selected.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400444 "A String",
445 ],
446 "emailOptIns": { # A set of opt-ins for a user. # The list of opt-ins for the user, related to communication preferences.
447 "specialOffers": True or False, # An opt-in about receiving email regarding new features and products.
448 "marketComm": True or False, # An opt-in about receiving email from Partners marketing teams. Includes
449 # member-only events and special promotional offers for Google products.
450 "phoneContact": True or False, # An opt-in to allow recieivng phone calls about their Partners account.
451 "physicalMail": True or False, # An opt-in to receive special promotional gifts and material in the mail.
452 "performanceSuggestions": True or False, # An opt-in about receiving email with customized AdWords campaign management
453 # tips.
454 },
455 "familyName": "A String", # The user's family name.
456 "channels": [ # A list of ids representing which channels the user selected they were in.
457 "A String",
458 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700459 "emailAddress": "A String", # The email address the user has selected on the Partners site as primary.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400460 "address": { # A location with address and geographic coordinates. May optionally contain a # The user's mailing address, contains multiple fields.
461 # detailed (multi-field) version of the address.
462 "languageCode": "A String", # Language code of the address. Should be in BCP 47 format.
463 "addressLine": [ # The following address lines represent the most specific part of any
464 # address.
465 "A String",
466 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700467 "locality": "A String", # Generally refers to the city/town portion of an address.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400468 "sortingCode": "A String", # Use of this code is very country-specific, but will refer to a secondary
469 # classification code for sorting mail.
470 "latLng": { # An object representing a latitude/longitude pair. This is expressed as a pair # The latitude and longitude of the location, in degrees.
471 # of doubles representing degrees latitude and degrees longitude. Unless
472 # specified otherwise, this must conform to the
473 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
474 # standard</a>. Values must be within normalized ranges.
475 #
476 # Example of normalization code in Python:
477 #
478 # def NormalizeLongitude(longitude):
479 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
480 # q, r = divmod(longitude, 360.0)
481 # if r > 180.0 or (r == 180.0 and q <= -1.0):
482 # return r - 360.0
483 # return r
484 #
485 # def NormalizeLatLng(latitude, longitude):
486 # """Wraps decimal degrees latitude and longitude to
487 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
488 # r = latitude % 360.0
489 # if r <= 90.0:
490 # return r, NormalizeLongitude(longitude)
491 # elif r >= 270.0:
492 # return r - 360, NormalizeLongitude(longitude)
493 # else:
494 # return 180 - r, NormalizeLongitude(longitude + 180.0)
495 #
496 # assert 180.0 == NormalizeLongitude(180.0)
497 # assert -180.0 == NormalizeLongitude(-180.0)
498 # assert -179.0 == NormalizeLongitude(181.0)
499 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
500 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
501 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
502 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
503 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
504 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
505 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
506 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
507 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
508 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
509 #
510 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
511 # as if it were annotated as ST_LOCATION.
512 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
513 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
514 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700515 "dependentLocality": "A String", # Dependent locality or sublocality. Used for UK dependent localities, or
516 # neighborhoods or boroughs in other locations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 "regionCode": "A String", # CLDR (Common Locale Data Repository) region code .
518 "administrativeArea": "A String", # Top-level administrative subdivision of this country.
519 "address": "A String", # The single string version of the address.
520 "postalCode": "A String", # Values are frequently alphanumeric.
521 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700522 "phoneNumber": "A String", # The user's phone number.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400523 "givenName": "A String", # The user's given name.
Thomas Coffee2f245372017-03-27 10:39:26 -0700524 "markets": [ # A list of ids representing which markets the user was interested in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 "A String",
526 ],
527 "profilePublic": True or False, # Whether the user's public profile is visible to anyone with the URL.
528 }
529
530 requestMetadata_userOverrides_ipAddress: string, IP address to use instead of the user's geo-located IP address.
531 requestMetadata_trafficSource_trafficSubId: string, Second level identifier to indicate where the traffic comes from.
532An identifier has multiple letters created by a team which redirected the
533traffic to us.
534 requestMetadata_userOverrides_userId: string, Logged-in user ID to impersonate instead of the user's ID.
535 x__xgafv: string, V1 error format.
536 Allowed values
537 1 - v1 error format
538 2 - v2 error format
539 requestMetadata_locale: string, Locale to use for the current request.
540 requestMetadata_experimentIds: string, Experiment IDs the current request belongs to. (repeated)
541 requestMetadata_trafficSource_trafficSourceId: string, Identifier to indicate where the traffic comes from.
542An identifier has multiple letters created by a team which redirected the
543traffic to us.
544 requestMetadata_partnersSessionId: string, Google Partners session ID.
545
546Returns:
547 An object of the form:
548
549 { # The profile information of a Partners user.
550 "industries": [ # A list of ids representing which industries the user selected.
551 "A String",
552 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700553 "primaryCountryCode": "A String", # The user's primary country, an ISO 2-character code.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700554 "adwordsManagerAccount": "A String", # If the user has edit access to multiple accounts, the user can choose the
555 # preferred account and it is used when a personal account is needed. Can
556 # be empty.
Thomas Coffee2f245372017-03-27 10:39:26 -0700557 "languages": [ # The list of languages this user understands.
558 "A String",
559 ],
560 "jobFunctions": [ # A list of ids represnting which job categories the user selected.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400561 "A String",
562 ],
563 "emailOptIns": { # A set of opt-ins for a user. # The list of opt-ins for the user, related to communication preferences.
564 "specialOffers": True or False, # An opt-in about receiving email regarding new features and products.
565 "marketComm": True or False, # An opt-in about receiving email from Partners marketing teams. Includes
566 # member-only events and special promotional offers for Google products.
567 "phoneContact": True or False, # An opt-in to allow recieivng phone calls about their Partners account.
568 "physicalMail": True or False, # An opt-in to receive special promotional gifts and material in the mail.
569 "performanceSuggestions": True or False, # An opt-in about receiving email with customized AdWords campaign management
570 # tips.
571 },
572 "familyName": "A String", # The user's family name.
573 "channels": [ # A list of ids representing which channels the user selected they were in.
574 "A String",
575 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700576 "emailAddress": "A String", # The email address the user has selected on the Partners site as primary.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400577 "address": { # A location with address and geographic coordinates. May optionally contain a # The user's mailing address, contains multiple fields.
578 # detailed (multi-field) version of the address.
579 "languageCode": "A String", # Language code of the address. Should be in BCP 47 format.
580 "addressLine": [ # The following address lines represent the most specific part of any
581 # address.
582 "A String",
583 ],
Thomas Coffee2f245372017-03-27 10:39:26 -0700584 "locality": "A String", # Generally refers to the city/town portion of an address.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 "sortingCode": "A String", # Use of this code is very country-specific, but will refer to a secondary
586 # classification code for sorting mail.
587 "latLng": { # An object representing a latitude/longitude pair. This is expressed as a pair # The latitude and longitude of the location, in degrees.
588 # of doubles representing degrees latitude and degrees longitude. Unless
589 # specified otherwise, this must conform to the
590 # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
591 # standard</a>. Values must be within normalized ranges.
592 #
593 # Example of normalization code in Python:
594 #
595 # def NormalizeLongitude(longitude):
596 # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
597 # q, r = divmod(longitude, 360.0)
598 # if r > 180.0 or (r == 180.0 and q <= -1.0):
599 # return r - 360.0
600 # return r
601 #
602 # def NormalizeLatLng(latitude, longitude):
603 # """Wraps decimal degrees latitude and longitude to
604 # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
605 # r = latitude % 360.0
606 # if r <= 90.0:
607 # return r, NormalizeLongitude(longitude)
608 # elif r >= 270.0:
609 # return r - 360, NormalizeLongitude(longitude)
610 # else:
611 # return 180 - r, NormalizeLongitude(longitude + 180.0)
612 #
613 # assert 180.0 == NormalizeLongitude(180.0)
614 # assert -180.0 == NormalizeLongitude(-180.0)
615 # assert -179.0 == NormalizeLongitude(181.0)
616 # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
617 # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
618 # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
619 # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
620 # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
621 # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
622 # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
623 # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
624 # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
625 # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
626 #
627 # The code in logs/storage/validator/logs_validator_traits.cc treats this type
628 # as if it were annotated as ST_LOCATION.
629 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
630 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
631 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700632 "dependentLocality": "A String", # Dependent locality or sublocality. Used for UK dependent localities, or
633 # neighborhoods or boroughs in other locations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400634 "regionCode": "A String", # CLDR (Common Locale Data Repository) region code .
635 "administrativeArea": "A String", # Top-level administrative subdivision of this country.
636 "address": "A String", # The single string version of the address.
637 "postalCode": "A String", # Values are frequently alphanumeric.
638 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700639 "phoneNumber": "A String", # The user's phone number.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400640 "givenName": "A String", # The user's given name.
Thomas Coffee2f245372017-03-27 10:39:26 -0700641 "markets": [ # A list of ids representing which markets the user was interested in.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400642 "A String",
643 ],
644 "profilePublic": True or False, # Whether the user's public profile is visible to anyone with the URL.
645 }</pre>
646</div>
647
648</body></html>