跳转到主要内容
PATCH
Partially updates a contact. Send only the fields you want to change.

授权

X-API-Key
string
header
必填

Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.

路径参数

contactId
integer<int64>
必填

Contact to update.

请求体

Contact fields to update.

Partial update of an existing contact (G.7, G.14). ContactId, bound from the route, identifies the contact. Every field is optional and a field left out keeps its value; a body with no field at all is a 400. FirstName, PrimaryEmail and ClientId cannot be cleared: null leaves them alone and a blank is a 400. LastName is replaced by any string sent. MobilePhone, MobilePhoneCountryCode, OfficePhone, OfficePhoneCountryCode, JobTitle, Department, TimeZone and Description clear with null (an empty string clears them too). SecondaryEmail and TagIds replace their set, and [] clears it.

TagIds
integer<int64>[] | null

Ids of the contact's tags, from GET /v1/contacts/tags. Replaces the set; [] clears it; omit to leave it unchanged. At most 100; every id must be an active contact tag or the whole request is a 400 on TagIds.

FirstName
string | null

Contact first name. Maximum 150 characters. Omit to keep it; it cannot be cleared.

示例:

"Jane"

LastName
string | null

Contact last name. Maximum 150 characters. Omit to keep it.

示例:

"Doe"

ClientId
integer<int64> | null

Identifier of the client the contact belongs to. Omit to keep it. A different client moves the person: this contact is deactivated and a new one is created under that client, so the response's Id differs from the one in the route.

LocationId
integer<int64> | null

Identifier of the client location the contact belongs to. Omit to keep the current location.

PrimaryEmail
string | null

Primary email address. Maximum 200 characters. Omit to keep it; it cannot be cleared.

示例:

"jane.doe@contoso.com"

SecondaryEmail
string[] | null

Additional (secondary) email addresses, replacing the current set. Omit to keep the current secondary emails; send an empty array to clear them. Maximum 200 characters each.

MobilePhone
string | null

Mobile phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters. Send null to clear it; omit to keep it.

MobilePhoneCountryCode
string | null

Mobile phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 100 characters. Send null to clear it; omit to keep it.

OfficePhone
string | null

Office phone number, as dialled within its country, e.g. 021 123 4567 for NZ; an international +64 21 123 4567 is accepted too. A number sent without its leading 0 (21 123 4567) is stored with it. Maximum 20 characters. Send null to clear it; omit to keep it.

OfficePhoneCountryCode
string | null

Office phone ISO 3166-1 alpha-2 region code (e.g. US). Maximum 25 characters. Send null to clear it; omit to keep it.

JobTitle
string | null

Contact job title. Maximum 100 characters. Send null to clear it; omit to keep it.

Department
string | null

Contact department. Maximum 150 characters. Send null to clear it; omit to keep it.

TimeZone
string | null

IANA time zone identifier for the contact (e.g. America/New_York). Maximum 50 characters. Send null to clear it; omit to keep it.

Description
string | null

Free-text description / notes for the contact. Maximum 2000 characters. Send null to clear it; omit to keep it.

响应

OK

StatusCode
enum<integer>
可用选项:
100,
101,
102,
103,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
421,
422,
423,
424,
426,
428,
429,
431,
451,
500,
501,
502,
503,
504,
505,
506,
507,
508,
510,
511
IsSuccess
boolean
Data
object

A contact belonging to a client. Timestamps are UTC.

DataContext
object | null
示例:

null

Notifications
object[]