Skip to content

patchCustomerData

Apply RFC 6902 JSON Patch operations to the customer’s data field.

Served by: maindata

Name Type
id ID!
patches [JSONPatchInput!]!

Customer

Applies RFC 6902 JSON Patch operations to the customer’s data field. Only changed fields are modified; untouched fields are preserved. See https://datatracker.ietf.org/doc/html/rfc6902 for the specification.

mutation PatchCustomerData($id: ID!, $patches: [JSONPatchInput!]!) {
patchCustomerData(id: $id, patches: $patches) {
createdAt
createdBy
data
dataTypeID
dataTypeSlug
deletedAt
deletedBy
id
tenantID
updatedAt
updatedBy
}
}

Variables

{
"id": "<customer id to patch>",
"patches": [
{
"op": "REPLACE",
"path": "/tier",
"value": "\"diamond\""
},
{
"op": "REPLACE",
"path": "/contacts",
"value": "10"
}
]
}