User Preferences
Update user preferences
Sends an atomic batch of user preferences to the downstream system. The downstream system either accepts the complete batch or rejects it. The API does not guarantee whether an absent preference is created or updated. When updates compete for the same user and account, the most recent updatedAt value wins.
PUT
/
user-preferences
Update user preferences
curl --request PUT \
--url https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
[
{
"partyId": "party-001",
"userId": "user-001",
"accountId": "account-1001",
"alias": "My Salary Account",
"visible": true,
"favorite": true,
"updatedAt": "2026-07-12T10:30:00.000Z",
"customFields": {
"sourceSystem": "danske"
}
},
{
"userId": "user-001",
"accountId": "account-1002",
"alias": null,
"visible": true,
"favorite": false,
"updatedAt": "2026-07-12T10:31:00.000Z"
}
]
'import requests
url = "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences"
payload = [
{
"partyId": "party-001",
"userId": "user-001",
"accountId": "account-1001",
"alias": "My Salary Account",
"visible": True,
"favorite": True,
"updatedAt": "2026-07-12T10:30:00.000Z",
"customFields": { "sourceSystem": "danske" }
},
{
"userId": "user-001",
"accountId": "account-1002",
"alias": None,
"visible": True,
"favorite": False,
"updatedAt": "2026-07-12T10:31:00.000Z"
}
]
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
partyId: 'party-001',
userId: 'user-001',
accountId: 'account-1001',
alias: 'My Salary Account',
visible: true,
favorite: true,
updatedAt: '2026-07-12T10:30:00.000Z',
customFields: {sourceSystem: 'danske'}
},
{
userId: 'user-001',
accountId: 'account-1002',
alias: null,
visible: true,
favorite: false,
updatedAt: '2026-07-12T10:31:00.000Z'
}
])
};
fetch('https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'partyId' => 'party-001',
'userId' => 'user-001',
'accountId' => 'account-1001',
'alias' => 'My Salary Account',
'visible' => true,
'favorite' => true,
'updatedAt' => '2026-07-12T10:30:00.000Z',
'customFields' => [
'sourceSystem' => 'danske'
]
],
[
'userId' => 'user-001',
'accountId' => 'account-1002',
'alias' => null,
'visible' => true,
'favorite' => false,
'updatedAt' => '2026-07-12T10:31:00.000Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences"
payload := strings.NewReader("[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"errorCode": "GC001",
"errorMessages": [
{
"gc": "The preference batch is invalid.",
"core": "Invalid account identifier."
}
]
}
][
{
"errorCode": "GC001",
"errorMessages": [
{
"gc": "The preference batch is invalid.",
"core": "Invalid account identifier."
}
]
}
]Body
application/json
A non-empty batch of per-user, per-account preferences.
Minimum array length:
1Response
The complete preference batch was accepted successfully.
Was this page helpful?
⌘I
Update user preferences
curl --request PUT \
--url https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
[
{
"partyId": "party-001",
"userId": "user-001",
"accountId": "account-1001",
"alias": "My Salary Account",
"visible": true,
"favorite": true,
"updatedAt": "2026-07-12T10:30:00.000Z",
"customFields": {
"sourceSystem": "danske"
}
},
{
"userId": "user-001",
"accountId": "account-1002",
"alias": null,
"visible": true,
"favorite": false,
"updatedAt": "2026-07-12T10:31:00.000Z"
}
]
'import requests
url = "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences"
payload = [
{
"partyId": "party-001",
"userId": "user-001",
"accountId": "account-1001",
"alias": "My Salary Account",
"visible": True,
"favorite": True,
"updatedAt": "2026-07-12T10:30:00.000Z",
"customFields": { "sourceSystem": "danske" }
},
{
"userId": "user-001",
"accountId": "account-1002",
"alias": None,
"visible": True,
"favorite": False,
"updatedAt": "2026-07-12T10:31:00.000Z"
}
]
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
partyId: 'party-001',
userId: 'user-001',
accountId: 'account-1001',
alias: 'My Salary Account',
visible: true,
favorite: true,
updatedAt: '2026-07-12T10:30:00.000Z',
customFields: {sourceSystem: 'danske'}
},
{
userId: 'user-001',
accountId: 'account-1002',
alias: null,
visible: true,
favorite: false,
updatedAt: '2026-07-12T10:31:00.000Z'
}
])
};
fetch('https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'partyId' => 'party-001',
'userId' => 'user-001',
'accountId' => 'account-1001',
'alias' => 'My Salary Account',
'visible' => true,
'favorite' => true,
'updatedAt' => '2026-07-12T10:30:00.000Z',
'customFields' => [
'sourceSystem' => 'danske'
]
],
[
'userId' => 'user-001',
'accountId' => 'account-1002',
'alias' => null,
'visible' => true,
'favorite' => false,
'updatedAt' => '2026-07-12T10:31:00.000Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences"
payload := strings.NewReader("[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.prdt.gcservices.io/cross-channel/customer-workbench/v0/user-preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"partyId\": \"party-001\",\n \"userId\": \"user-001\",\n \"accountId\": \"account-1001\",\n \"alias\": \"My Salary Account\",\n \"visible\": true,\n \"favorite\": true,\n \"updatedAt\": \"2026-07-12T10:30:00.000Z\",\n \"customFields\": {\n \"sourceSystem\": \"danske\"\n }\n },\n {\n \"userId\": \"user-001\",\n \"accountId\": \"account-1002\",\n \"alias\": null,\n \"visible\": true,\n \"favorite\": false,\n \"updatedAt\": \"2026-07-12T10:31:00.000Z\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"errorCode": "GC001",
"errorMessages": [
{
"gc": "The preference batch is invalid.",
"core": "Invalid account identifier."
}
]
}
][
{
"errorCode": "GC001",
"errorMessages": [
{
"gc": "The preference batch is invalid.",
"core": "Invalid account identifier."
}
]
}
]