---
schema_version: "1"
id: 1e6c5a4036da77a127128450e917d4996699dc5f52c7ec3aafaff52f07445219
title: Data Global Preferences (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-data-global-preferences.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-global-preferences
source_site: developer.salesforce.com
content_type: documentation
content_hash: bd1b98f544a086b6bebf1142167f5b3c3d0997256bc79276ff883b53e11f1587
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Global Preferences (deprecated)

# Data Global Preferences (deprecated)

Data API endpoints enable developers to build applications for merchants: Create, update, delete business objects, like products, customers, pricing and promotions or assignments. They typically provide read and write access and are designed for moderate usage.

**Version:** 25.6

## Servers

*   `https://{host}/s/-/dw/data/v25_6`

Protocols: https.

## Security

*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### GET Get Custom Preferences

`GET /global_preferences/preference_groups/{group_id}/{instance_type}`

Operation ID: `Get Custom Preferences`. Tags: global\_preferences. Security: oauth2\_application.

For the specified instance, read the custom preferences in the preference group at the global(organization) level. Specify 'current' to retrieve the preferences for the instance on which this call is being made. The system will recognize its type.

Note: If instance type sandbox is used, the preference values of development instance type will be returned as fallback.

This endpoint may return the following faults:

*   404 - CustomPreferenceGroupNotFoundException - Indicates the preference group is not found.

#### Parameters

*   `instance_type` (path, string, required) One of {staging,development,sandbox,production,current}.
*   `group_id` (path, string, required) The ID of the preference group.
*   `mask_passwords` (query, boolean) Set to true to mask the values of preferences of type Password.
*   `expand` (query, array of string) The expansion "sites" retrieves the custom preferences in the preference group for all the available sites.

#### Responses

*   **404** `CustomPreferenceGroupNotFoundException` - Indicates the preference group is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `organization_preferences`.
    

### PATCH Update Custom Preferences

`PATCH /global_preferences/preference_groups/{group_id}/{instance_type}`

Operation ID: `Update Custom Preferences`. Tags: global\_preferences. Security: oauth2\_application.

For the specified instance, update one or more custom preferences in the preference group at the global(organization) level.

Note: If instance type sandbox is used, the preference values of development instance type will be returned as fallback.

This endpoint may return the following faults:

*   404 - CustomPreferenceGroupNotFoundException - Indicates the preference group is not found.

#### Parameters

*   `instance_type` (path, string, required) One of {staging,development,sandbox,production}.
*   `group_id` (path, string, required) The ID of the preference group.
*   `mask_passwords` (query, boolean) Set to true to mask the values of preferences of type Password.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `organization_preferences`.

#### Responses

*   **404** `CustomPreferenceGroupNotFoundException` - Indicates the preference group is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `organization_preferences`.
    

## Schemas

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### organization\_preferences

Represents a set of preferences attached at the organization level.

*   `link` (_string_) A URL that returns the full details for a custom preference
*   `site_preferences` (_array of site\_preferences_) The list of site preferences, returned with expand=sites

_Example_

```
{
  "link": "https://example.com/s/-/dw/data/{version}/global_preferences/preference_groups/my-preferencegroup/staging",
  "site_preferences": [
    {
      "link": "https://example.com/s/-/dw/data/{version}/sites/Site1/site_preferences/preference_groups/my-preferencegroup/staging",
      "site": {
        "id": "Site1",
        "in_deletion": false,
        "link": "https://example.com/s/-/dw/data/{version}/sites/Site1",
        "storefront_status": "online"
      },
      "c_preference1": "Blue",
      "c_preference2": [
        "Small",
        "Medium"
      ],
      "c_preference3": true,
      "c_preference4": 11
    },
    {
      "link": "https://example.com/s/-/dw/data/{version}/sites/Site2/site_preferences/preference_groups/my-preferencegroup/staging",
      "site": {
        "id": "Site1",
        "in_deletion": false,
        "link": "https://example.com/s/-/dw/data/{version}/sites/Site1",
        "storefront_status": "online"
      },
      "c_preference1": "Green"
    }
  ],
  "c_preference1": "Red",
  "c_preference2": [
    "Small",
    "Large"
  ],
  "c_preference3": true,
  "c_preference4": 10
}
```

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)

### site\_preferences

Represents a set of preferences attached at the organization level.

*   `link` (_string_) A URL that returns the full details for a custom preference
*   `site` (_site_) The site that contains the preferences

_Example_

```
{
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/site_preferences/preference_groups/MyPreferenceGroup/staging",
  "site": {
    "customer_list_link": {
      "customer_list_id": "SiteGenesis",
      "link": "https://example.com/s/-/dw/data/{version}/customer_lists/SiteGenesis"
    },
    "display_name": {
      "default": "SiteGenesis"
    },
    "id": "SiteGenesis",
    "in_deletion": false,
    "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis",
    "storefront_status": "online"
  }
}
```

### site

Document representing a site.

*   `cartridges` (_string_) The cartridge Path of the site
*   `creation_date` (_string (date-time)_)
*   `customer_list_link` (_customer\_list\_link_) The link to the customer list.
*   `description` (_object (localized)_) The description of this site.
    
    Additional properties: `string`.
    
*   `display_name` (_object (localized)_) The display name entered by the user.
    
    Additional properties: `string`.
    
*   `id` (_string_, required) The id of this site.  
    Minimum length: 1.
*   `in_deletion` (_boolean_) The deletion status of this site, true if in deletion
*   `last_modified` (_string (date-time)_)
*   `link` (_string_) A link directly to the site
*   `storefront_status` (_string_)  
    Allowed values: `online`, `maintenance`, `to_be_deleted`, `protected`.

_Example_

```
{
  "customer_list_link": {
    "customer_list_id": "SiteGenesis",
    "link": "https://example.com/s/-/dw/data/{version}/customer_lists/SiteGenesis"
  },
  "description": {
    "default": "Prototypical site used for starting point"
  },
  "display_name": {
    "default": "Site Genesis"
  },
  "id": "SiteGenesis",
  "in_deletion": false,
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis",
  "storefront_status": "online"
}
```

### customer\_list\_link

Document representing a link to a customer list.

*   `customer_list_id` (_string_) The customerlist id.
*   `link` (_string_) The target of the link.
*   `title` (_object (localized)_) The link title.
    
    Additional properties: `string`.
    

_Example_

```
{
  "customer_list_id": "SiteGenesis",
  "link": "https://example.com/s/-/dw/data/{version}/customer_lists/SiteGenesis"
}
```