---
schema_version: "1"
id: 4a6b410649ec7872bdd8eb66cf6a52a1ebcacfe9b49105f23c5da030d283fd74
title: Shop Custom Objects (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-shop-custom-objects.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-shop-custom-objects
source_site: developer.salesforce.com
content_type: documentation
content_hash: 75dac587abd4135a0731ee7830684915707c8768bca5e3f817010978031dc68b
products:
  - B2C Commerce
  - Salesforce APIs
---
Shop Custom Objects (deprecated)

# Shop Custom Objects (deprecated)

The Shop API endpoints enable developers to build full shopper-experience applications such as storefronts. They are designed for high-scale usage, and include a number of areas such as Baskets & Orders, Customers, Products and Pricing. Shop API endpoints are typically read-only APIs, with the exception of baskets and orders.

**Version:** 25.6

## Servers

*   `https://{host}/s/{siteId}/dw/shop/v25_6`

Protocols: https.

## Security

*   `customers_auth` (basic) User authentication either for a registered or a guest customer (selectable in request body). Access via Base64 encoded customer:password string as 'Authorization: Basic' header.
*   `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 Read custom object

`GET /custom_objects/{object_type}/{key}`

Operation ID: `Read custom object`. Tags: custom\_objects. Security: client\_id; customers\_auth.

Reads a custom object with a given object type ID and a value for the key attribute of the object which represents its unique identifier.

This endpoint may return the following faults:

*   400 - MalformedKeyParameterException - If the object key must be an integer, but the path parameter has an invalid format
*   404 - CustomObjectNotFoundException - If the custom object cannot be found
*   404 - ObjectTypeNotFoundException - For an unknown object type ID

#### Parameters

*   `object_type` (path, string, required) the ID of the object type  
    Minimum length: 1.
*   `key` (path, string, required) the key attribute value of the custom object  
    Minimum length: 1.

#### Responses

*   **400** `MalformedKeyParameterException` - If the object key must be an integer, but the path parameter has an invalid format
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `CustomObjectNotFoundException` - If the custom object cannot be found or `ObjectTypeNotFoundException` - For an unknown object type ID
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `custom_object`.
    

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

### custom\_object

Document representing a custom object that contains all defined custom attributes for its object type.

*   `key_property` (_string_) The name of the key property for the custom object.
*   `key_value_integer` (_integer (int32)_) The id of the custom object when the type of the key is Integer.
*   `key_value_string` (_string_) The id of the custom object when the type of the key is String.
*   `object_type` (_string_) The id of the object type.  
    Maximum length: 256.

_Example_

```
{
  "key_property": "key_attribute",
  "object_type": "my_object_type",
  "c_boolean": true,
  "c_date": "2015-02-03T00:00:00.000Z",
  "c_email": "jdoe@salesforce.com",
  "c_integer": 42,
  "c_number": 42,
  "c_string": "some text"
}
```

### cause

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