---
schema_version: "1"
id: 0ddd4f6c2a24adba5576872f9fe40540ac8cf7f7bcdd03e5d91bc4f84ca125a0
title: Data Cartridges (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-cartridges.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-cartridges
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4c9993a0575e2f53d3f748682899bf4803f04ba7ba73eceed045e6dec5e55e85
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Cartridges (deprecated)

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

### PUT Overwrite cartridge path

`PUT /sites/{site_id}/cartridges`

Operation ID: `Overwrite cartridge path`. Tags: sites. Security: oauth2\_application.

Overwrite cartridge path.

This endpoint may return the following faults:

*   400 - InvalidCartridgePathException - Indicates that the cartridge path is invalid
*   404 - SiteNotFoundException - Indicates that site specified with the given id is unknown.

#### Parameters

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

#### Request body (required)

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

#### Responses

*   **400** `InvalidCartridgePathException` - Indicates that the cartridge path is invalid
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `SiteNotFoundException` - Indicates that site specified with the given id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `cartridge_path_api_response`.
    

### POST Add a cartridge to cartridge path

`POST /sites/{site_id}/cartridges`

Operation ID: `Add a cartridge to cartridge path`. Tags: sites. Security: oauth2\_application.

Add a cartridge to current cartridge path.

This endpoint may return the following faults:

*   400 - CartridgeAlreadyExistException - Indicates that the cartridge already exist in cartridge path
*   400 - InvalidCartridgeException - Indicates that the cartridge name is invalid
*   400 - InvalidOperationException - The error may happen when position is either 'after' or 'before'. It indicates either target cartridge is not a existing custom cartridge.
*   404 - SiteNotFoundException - Indicates that site specified with the given id is unknown.

#### Parameters

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

#### Request body (required)

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

#### Responses

*   **400** `CartridgeAlreadyExistException` - Indicates that the cartridge already exist in cartridge path or `InvalidCartridgeException` - Indicates that the cartridge name is invalid or `InvalidOperationException` - The error may happen when position is either 'after' or 'before'. It indicates either target cartridge is not a existing custom cartridge.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `SiteNotFoundException` - Indicates that site specified with the given id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `cartridge_path_api_response`.
    

### DELETE Remove a cartridge from cartridge path

`DELETE /sites/{site_id}/cartridges/{cartridge_name}`

Operation ID: `Remove a cartridge from cartridge path`. Tags: sites. Security: oauth2\_application.

Remove a cartridge from cartridge path.

This endpoint may return the following faults:

*   400 - InvalidOperationException - It indicates either the cartridge doesn't exist in cartridge path or the cartridge can not be deleted (e.g. System Cartridge).
*   404 - SiteNotFoundException - Indicates that site specified with the given id is unknown.

#### Parameters

*   `site_id` (path, string, required) ID of the site.  
    Minimum length: 1.
*   `cartridge_name` (path, string, required) request body  
    Minimum length: 1.

#### Responses

*   **400** `InvalidOperationException` - It indicates either the cartridge doesn't exist in cartridge path or the cartridge can not be deleted (e.g. System Cartridge).
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `SiteNotFoundException` - Indicates that site specified with the given id is unknown.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `cartridge_path_api_response`.
    

## Schemas

### cartridge\_path\_create\_request

Request Body for put operation

*   `cartridges` (_string_, required) New cartridge path

_Example_

```
{
  "cartridges": "new_cartridges1:new_cartridges2"
}
```

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

### cartridge\_path\_api\_response

Response of cartridge path related operation

*   `cartridges` (_string_) Updated cartridge path
*   `site_id` (_string_) Site id

_Example_

```
{
  "cartridges": "new_cartridge:custom_cartridge_1:custom_cartridge_2:core",
  "site_id": "SiteGenesis"
}
```

### cartridge\_path\_add\_request

Request body for post operation

*   `name` (_string_, required) Name of the cartridge.
*   `position` (_string_, required) Position of the cartridge.  
    Allowed values: `first`, `last`, `before`, `after`.
*   `target` (_string_) When position is 'before' or 'after', need to specify the target cartridge

_Example_

```
{
  "name": "new_cartridge",
  "position": "before",
  "target": "custom_cartridge_1"
}
```

### cause

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