---
schema_version: "1"
id: 4044a7aeec06d8769b3a59201b131d2c63ca16c1986f4cb55159b5f7bdc1ec9e
title: Data Stores (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-stores.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-stores
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6df0e41d7fd87fc93fced0d78b8d47c9aefa2afffa9bca652ba51c6bdefb0205
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Stores (deprecated)

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

`GET /sites/{site_id}/stores`

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

Action to get all the stores with no filtering.

#### Parameters

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

### GET Get Store

`GET /sites/{site_id}/stores/{id}`

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

Action to get store information.

This endpoint may return the following faults:

*   404 - StoreNotFoundException - Thrown in case the store does not exist matching the given id

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `id` (path, string, required) The id of the requested store.  
    Minimum length: 1. Maximum length: 256.
*   `select` (query, string) the selector for the get. If not passed, then the defaultSelector will be used instead.

#### Responses

*   **404** `StoreNotFoundException` - Thrown in case the store does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `store`.
    

### PUT Create Store

`PUT /sites/{site_id}/stores/{id}`

Operation ID: `Create Store`. Tags: sites. Security: oauth2\_application.

Creates a store using the information provided.

This endpoint may return the following faults:

*   400 - IdConflictException - if the Id in request is not the same as the ID in document.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `id` (path, string, required) The id of the store to create.  
    Minimum length: 1. Maximum length: 256.

#### Request body (required)

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

#### Responses

*   **400** `IdConflictException` - if the Id in request is not the same as the ID in document.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `store`.
    

### DELETE Delete Stores

`DELETE /sites/{site_id}/stores/{id}`

Operation ID: `Delete Stores`. Tags: sites. Security: oauth2\_application.

Deletes the store by ID

This endpoint may return the following faults:

*   404 - StoreNotFoundException - Thrown in case the store does not exist matching the given id

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `id` (path, string, required) One store id to remove  
    Minimum length: 1. Maximum length: 256.

#### Responses

*   **204**
*   **404** `StoreNotFoundException` - Thrown in case the store does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Update Store

`PATCH /sites/{site_id}/stores/{id}`

Operation ID: `Update Store`. Tags: sites. Security: oauth2\_application.

Updates the store with the specified information.

This endpoint may return the following faults:

*   404 - StoreNotFoundException - Thrown in case the store does not exist matching the given id

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `id` (path, string, required) The id of the requested store.  
    Minimum length: 1. Maximum length: 256.

#### Request body (required)

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

#### Responses

*   **404** `StoreNotFoundException` - Thrown in case the store does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `store`.
    

## Schemas

### stores

Document representing an unfiltered list of stores.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of store_)
*   `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": [
    {
      "address1": "5 Wall St",
      "address2": "2nd Floor",
      "city": "Burlington",
      "country_code": "us",
      "demandware_pos_enabled": false,
      "email": "support@salesforce.com",
      "fax": "877-540-3035",
      "id": "my-store",
      "image": "http://example.com/on/demandware.static/-/Sites/default/v1437070303037/store99.jpg",
      "inventory_id": "inventoryListA",
      "latitude": "42.487796",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/stores/my-store",
      "longitude": "-71.18822",
      "phone": "877-540-3032",
      "postal_code": "01827",
      "state_code": "MA",
      "store_events": {
        "default": "50% off Sale"
      },
      "store_hours": {
        "default": "09:00 am - 06:00 pm"
      },
      "store_locator_enabled": true
    },
    {
      "address1": "100 Mall Rd",
      "city": "Burlington",
      "country_code": "us",
      "demandware_pos_enabled": false,
      "email": "mall@burlington.com",
      "fax": "555-555-1213",
      "id": "my-store2",
      "latitude": "42.000000",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/stores/my-store2",
      "longitude": "-71.000000",
      "phone": "555-555-1212",
      "postal_code": "01827",
      "state_code": "MA",
      "store_locator_enabled": true
    }
  ],
  "select": "**",
  "start": 0,
  "total": 2
}
```

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

### store

Document representing a store

*   `address1` (_string_) Returns the first address.  
    Maximum length: 256.
*   `address2` (_string_) Returns the second address value.  
    Maximum length: 256.
*   `city` (_string_) Returns the city.  
    Maximum length: 256.
*   `country_code` (_string_) The two-character country code per ISO 3166-1 alpha-2.  
    Allowed values: `CA`, `DE`, `US`. Value meanings: `CA`: Canada; `DE`: Germany; `US`: United States. Maximum length: 2.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `email` (_string_) Email address to contact the store  
    Maximum length: 256.
*   `fax` (_string_) Returns the fax number .  
    Maximum length: 256.
*   `id` (_string_) The id for the store  
    Maximum length: 256.
*   `image` (_media\_file_) The image associated with the store
*   `inventory_id` (_string_) The inventory list associated with the store  
    Maximum length: 256.
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `latitude` (_number (double)_) The latitude of the store  
    Minimum: -90. Maximum: 90.
*   `link` (_string_) a URL that is used to get this instance. The property is computed and cannot be changed.
*   `longitude` (_number (double)_) The longitude of the store  
    Minimum: -180. Maximum: 180.
*   `name` (_string_) The name of the store
*   `phone` (_string_) Returns the phone number.  
    Maximum length: 256.
*   `pos_enabled` (_boolean_) Whether this store uses our Store product for Point-of-Sale
*   `postal_code` (_string_) The postal code for the store  
    Maximum length: 10.
*   `state_code` (_string_) Returns the customer's state.  
    Maximum length: 256.
*   `store_events` (_object (localized)_) The store events (localized)
    
    Additional properties: `markup_text`.
    
*   `store_hours` (_object (localized)_) The store opening hours (localized)
    
    Additional properties: `markup_text`.
    
*   `store_locator_enabled` (_boolean_) Whether this store should appear in store locator searches

_Example_

```
{
  "address1": "5 Wall St",
  "address2": "2nd Floor",
  "city": "Burlington",
  "country_code": "us",
  "demandware_pos_enabled": false,
  "email": "support@salesforce.com",
  "fax": "877-540-3035",
  "id": "my-store",
  "image": "http://example.com/on/demandware.static/-/Sites/default/v1437070303037/store99.jpg",
  "inventory_id": "inventoryListA",
  "latitude": "42.487796",
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/stores/my-store",
  "longitude": "-71.18822",
  "phone": "877-540-3032",
  "postal_code": "01827",
  "state_code": "MA",
  "store_events": {
    "default": "50% off Sale"
  },
  "store_hours": {
    "default": "09:00 am - 06:00 pm"
  },
  "store_locator_enabled": true
}
```

### cause

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

### media\_file

*   `abs_url` (_string_) The absolute URL with request protocol (read only)
*   `alt` (_object (localized)_) The alternative image text
    
    Additional properties: `string`.
    
*   `dis_base_url` (_string_) The DIS base URL only for product images
*   `path` (_string_) The raw media file path (only this needs to be provided in update request)
*   `title` (_object (localized)_) The image title
    
    Additional properties: `string`.
    

_Example_

```
{
  "path": "option.jpg"
}
```

### markup\_text

*   `markup` (_string_) The rendered HTML (read only)
*   `source` (_string_) The raw markup text (only this needs to be provided in update request)