---
schema_version: "1"
id: 33192f848c717253b385913bac8cf34b8d6cdda914554758e034fdfe0261dfdf
title: Data Sites (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-sites.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-sites
source_site: developer.salesforce.com
content_type: documentation
content_hash: f3e3ace9ad4c410c4783e66240de9e67231ae7e5753c84da706a0b60b80ffbc7
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Sites (deprecated)

# Data Sites (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 Sites

`GET /sites`

Operation ID: `Get Sites`. Tags: sites. Security: oauth2\_application.

Action to get all existing sites.

#### Parameters

*   `start` (query, integer (int32)) Optional start index for retrieving the items from a given index (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving only a subset of the items (default is 25).
*   `select` (query, string) The property selector.

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `sites`.
    

### GET Get site

`GET /sites/{site_id}`

Operation ID: `Get site`. Tags: sites. Security: oauth2\_application.

Action to read an existing site.

#### Parameters

*   `site_id` (path, string, required) the id of the site  
    Minimum length: 1.

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `site`.
    

## Schemas

### sites

Document representing an unfiltered list of sites.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of site_)
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

_Example_

```
{
  "count": 2,
  "data": [
    {
      "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": {
        "customer_list_id": "MyCustomerList",
        "link": "https://example.com/s/-/dw/data/{version}/customer_lists/MyCustomerList"
      },
      "description": {
        "default": "A site that sells products"
      },
      "display_name": {
        "default": "My Site"
      },
      "id": "MySite",
      "in_deletion": false,
      "link": "https://example.com/s/-/dw/data/{version}/sites/MySite",
      "storefront_status": "online"
    }
  ],
  "select": "**",
  "start": 0,
  "total": 2
}
```

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

### cause

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

### 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.