Patch a contact record

patch/contacts/{contactId}
Internal-Use Only

Patches a contact record by sending a partial representation of the contact record, which includes a key field and the fields that are to be changed. The full object is sent in the response. If a field in the partial representation has the 'null' value, it is interpreted to mean that a value is not sent rather than having the value in the field erased.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2018-05-13T15:02:40.719Z",
3 "modifiedTimeStamp": "2018-05-13T15:02:40.719Z",
4 "createdBy": "joeMarket",
5 "modifiedBy": "joeMarket",
6 "id": "5195ceb6-228e-439d-b3df-307197f1e7a7",
7 "subjectId": "Francis.Albert.Bacon.19195313421",
8 "subjectLevel": "household",
9 "objectUri": "/decisions/flows/5c5bc46a-cea0-4102-a88c-71cf1506e2c5",
10 "objectRevisionId": "afb62877-64cb-4ae6-bf0c-4e2783a38d3a",
11 "objectType": "decision",
12 "objectVariables": [
13 {
14 "id": "a4722451-fb6f-4c9a-8bb8-4cf1eaba73c0",
15 "name": "ov1",
16 "value": "A",
17 "dataType": "string"
18 },
19 {
20 "id": "395aebd9-1646-4d84-9c05-d8e80efe72b7",
21 "name": "ov2",
22 "value": "B",
23 "dataType": "string"
24 }
25 ],
26 "treatmentsForConsideration": [
27 {
28 "id": "f025ee1f-a60a-4bb5-8236-0c697562653e",
29 "treatmentId": "4f3f14cf-69ed-4d59-9ea2-ecfb525cfa83",
30 "treatmentRevisionId": "7aa86c12-55cf-4e99-8060-5b516314dc44",
31 "treatmentGroupId": "bc912f15-96a0-4991-ba2a-9f12491cefc0",
32 "treatmentGroupRevisionId": "9d2fccaa-428a-4604-a242-4f259ab8a553",
33 "objectNodeId": "6bf8f1b3-9910-40ad-8146-6affd4f49a1f",
34 "presented": true,
35 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
36 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
37 },
38 {
39 "id": "383bebdf-9378-4ed9-a2f3-127f53acfd22",
40 "treatmentId": "826c9635-809a-44cf-a982-63e374846087",
41 "treatmentRevisionId": "d14e393d-c21c-4654-8095-376909edace5",
42 "treatmentGroupId": "1ba80181-7996-4ed5-8d58-66be8d2204e3",
43 "treatmentGroupRevisionId": "f38725dc-cb53-4f09-b69c-661a7d675dac",
44 "objectNodeId": "cf328b78-81b3-465e-b86b-2eb71876a66a",
45 "presented": true,
46 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
47 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
48 },
49 {
50 "id": "23c1ebb8-7df8-4555-92d7-226ad88ad734",
51 "treatmentId": "2826de5a-d0d6-4bd1-8a80-08c12ba2ad81",
52 "treatmentRevisionId": "f14c3aa2-98a4-4a42-8b29-c99ad3cc02a8",
53 "treatmentGroupId": "1ba80181-7996-4ed5-8d58-66be8d2204e3",
54 "treatmentGroupRevisionId": "f38725dc-cb53-4f09-b69c-661a7d675dac",
55 "objectNodeId": "f7d361a9-d488-47f6-a579-e4cf28fb7324",
56 "presented": true,
57 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
58 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
59 }
60 ],
61 "ruleFired": "00010",
62 "pathTraversed": "/9e4e324b-de68-4035-b511-84cd558d5408/2541ab6e-3e7d-4ba0-8f04-7fc13a8e9794/509c4d2d-dc2c-4cb3-a094-5628e1ec879d",
63 "responseTrackingCode": "GreatCustomer.07f16e7a-db89-400a-91d9-8b6868f07b7b",
64 "receiverId": "Francis.Albert.Bacon.19195313421",
65 "receiverRole": "customer",
66 "channel": "web",
67 "excludeFromContactRule": false,
68 "conclusionResponseValue": "",
69 "conclusionResponseType": "crt_x",
70 "version": 1,
71 "links": [
72 {
73 "method": "GET",
74 "rel": "self",
75 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
76 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
77 "type": "application/vnd.sas.decision.subject.contact"
78 },
79 {
80 "method": "PUT",
81 "rel": "update",
82 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
83 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
84 "type": "application/vnd.sas.decision.subject.contact",
85 "responseType": "application/vnd.sas.decision.subject.contact"
86 },
87 {
88 "method": "POST",
89 "rel": "create",
90 "href": "/subjectContacts/contacts",
91 "uri": "/subjectContacts/contacts",
92 "type": "application/vnd.sas.decision.subject.contact",
93 "responseType": "application/vnd.sas.decision.subject.contact"
94 },
95 {
96 "method": "PATCH",
97 "rel": "patch",
98 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
99 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
100 "type": "application/vnd.sas.decision.subject.contact",
101 "responseType": "application/vnd.sas.decision.subject.contact"
102 },
103 {
104 "method": "DELETE",
105 "rel": "delete",
106 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
107 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7"
108 },
109 {
110 "method": "GET",
111 "rel": "up",
112 "href": "/subjectContacts/contacts",
113 "uri": "/subjectContacts/contacts",
114 "type": "application/vnd.sas.collection",
115 "itemType": "application/vnd.sas.decision.subject.contact"
116 }
117 ]
118}

Path Parameters

NameTypeRequiredDescription
contactId
string
true

The resource identifier for a contact. Alternatively, use the delegate resource identifier @deriveFromContent. When this delegate resource identifier is used, the service looks into the request body for an identifier of the resource. In this case, it is the responseTrackingCode member of the partial contact record. This identifier is to be used in lieu of the actual resource identifier.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

The ETag value that was returned from a GET, POST, or PATCH of the resource. If the ETag value does not match the ETag value of the resource, the update is not completed. This is preferred over the If-Unmodified-Since header.

If-Unmodified-Since
string
false

The value of the last modified timestamp of the resource. If the resource has been updated since this time, the update cannot be completed.

Request Body

The contact and response representation.

A contact representation

NameTypeRequiredDescription
subjectId
string
true

A string that identifies the subject. This cannot be unique across subject levels.

subjectLevel
string
true

A string that indicates the type of subject ID. Example values are household and customer. A subject is uniquely identified by the subjectLevel and subjectId tuple.

objectUri
string
true

A URI of the resource that created this contact record.

objectRevisionId
string
true

A string that identifies the revision of the resource that created this contact record.

objectType
string
true

A string that identifies the type of resource that created this contact record.

objectVariables
array [Object Value]
false

A place for saving arbitrary values from the object.

treatmentsForConsideration
array [Treatments for Subject Consideration]
false

All the treatments that a subject can consider.

ruleFired
string
false

An encoded string that records which business rules evaluated to true.

pathTraversed
string
false

An ordered string that shows the IDs of rules that were evaluated.

abTests
array [AB Test Node Records]
false

A place for recording values from AB test node.

responseTrackingCode
string
true

A string that a response uses. This is provided by the merchant's application. This is for grouping all the responses, one for each treatment, considered by the subject.

receiverId
string
false

A string that identifies the person that receives this treatment. If the receiver is the subject, then receiverId equals subjectId. Otherwise, they are not equal.

receiverRole
string
false

Identifies whether the receiver is a subject or an agent.

channel
string
false

The channel through which the contact is made. This can be different from the response channel. For example, a subject receives an email for a purchase offer and makes the purchase by telephone.

modifiedTimeStamp
string<date-time>
false

Timestamp when this object is last modified. This field is a derived field. This tells when the response is recorded.

modifiedBy
string
false

ID of the user who last modified this object. This field is a derived field.

conclusionResponseValue
string
false

A summary response value derived from the responses to the individual treatments

conclusionResponseType
string
false

An interpretation of conclusionResponseValue.

excludeFromContactRule
boolean
false

When true, this contact record is ignored by a contact rule when determining an answer. The default is false.

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid.HeadersSchema
404Not FoundNo resource exists at the requested path.HeadersSchema
409ConflictThe presentation has already been set and cannot be updated.Schema
412Precondition FailedThe `If-Match` request header did not match the resource's entity tag, or the `If-Unmodified-Since` request header did not match the resource's last modified timestamp.HeadersSchema
422Unprocessable EntityThe server understands the request but was unable to process the contained instructions. There are inconsistencies between members of the contact records as a result of the operation. An example is changing the respondedTimeStamp to a value earlier than the stored presentedTimeStamp.HeadersSchema
428Precondition RequiredThe request header did not include a `If-Match` or 'If-Unmodified-Since' precondition.HeadersSchema