---
schema_version: "1"
id: 6140808da62c9a8057dc63cef9380b5e0208582b6e914076c1bd1f815a29f7c3
title: Data Site 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-site-preferences.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-site-preferences
source_site: developer.salesforce.com
content_type: documentation
content_hash: e348ba98d0ffc1c1765b0a45bb382dad7d085cde9e281df429d34e74e1991d8f
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Site Preferences (deprecated)

# Data Site 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 Site Preferences

`GET /sites/{site_id}/site_preferences/preference_groups/{group_id}/{instance_type}`

Operation ID: `Get Custom Site Preferences`. Tags: sites. Security: oauth2\_application.

For the specified site and instance, read the custom preferences in the preference group. Specify 'current' to retrieve the preferences for the instance on which this call is being made. The system will recognize its type.

This endpoint may return the following faults:

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

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `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.

#### 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: `site_preferences`.
    

### PATCH Update Custom Site Preferences

`PATCH /sites/{site_id}/site_preferences/preference_groups/{group_id}/{instance_type}`

Operation ID: `Update Custom Site Preferences`. Tags: sites. Security: oauth2\_application.

For the specified site and instance, update one or more custom preferences in the preference group. Preferences of type password cannot be set to "\*\*\*\*\*\*\*\*\*\*\*\*" since it is a reserved value.

This endpoint may return the following faults:

*   404 - CustomPreferenceGroupNotFoundException - Indicates the preference group is not found.
*   404 - ObjectTypeNotFoundException - Indicates the SitePreferences system object is not found.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `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: `site_preferences`.

#### Responses

*   **404** `CustomPreferenceGroupNotFoundException` - Indicates the preference group is not found. or `ObjectTypeNotFoundException` - Indicates the SitePreferences system object is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `site_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.

### 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"
  }
}
```

### cause

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

### 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"
}
```