---
schema_version: "1"
id: 6fa464f5314c688d139587b1bf32326e65bb7c147cae290ff934a524f7ac6ece
title: Data Custom Object Definitions (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-custom-object-definitions.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-custom-object-definitions
source_site: developer.salesforce.com
content_type: documentation
content_hash: 19068008f2db573712e16c0c28608d0401de736f91e7fb826f6af9530ed99528
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Custom Object Definitions (deprecated)

# Data Custom Object Definitions (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

### POST Search Attribute Definitions for Custom Object

`POST /custom_object_definitions/{object_type}/attribute_definition_search`

Operation ID: `Search Attribute Definitions for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Searches the attribute definitions of the specified custom object type.

The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets. These are the list of searchable attributes with their corresponding buckets:

Main:

*   id - String
    
*   display\_name\* - Localized String
    
*   description\* - Localized String
    
*   key - boolean
    
*   mandatory - boolean
    
*   searchable - boolean
    
*   system - boolean
    
*   visible - boolean
    

Definition version:

*   localizable - boolean
    
*   site\_specific - boolean
    
*   value\_type - one of {string, int, double, text, html, date, image, boolean, money, quantity, datetime, email, password, set\_of\_string, set\_of\_int, set\_of\_double, enum\_of\_string, enum\_of\_int, unknown}
    

Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining localizable and description above, only a conjunction is allowed (AND), whereas display\_name and description can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception will be thrown.

Additionally, attribute definitions can also be searched by attribute group.

*   group - String
    

These attributes are not searchable or sortable for built in system attributes. They work normally for non system attributes.

Note that only searchable attributes can be used in sorting.

This endpoint may return the following faults:

*   400 - MalformedSearchParameterException - Indicates the query is ill-formed.
*   404 - ObjectTypeNotFoundException - Indicates that the object type cannot be found.

#### Parameters

*   `object_type` (path, string, required) The type of object

#### Request body (required)

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

#### Responses

*   **400** `MalformedSearchParameterException` - Indicates the query is ill-formed.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Indicates that the object type cannot be found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_definition_search_result`.
    

### GET Get Attribute Definitions for Custom Object

`GET /custom_object_definitions/{object_type}/attribute_definitions`

Operation ID: `Get Attribute Definitions for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Action to get all the attribute definitions with no filtering.

This endpoint may return the following faults:

*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required)
*   `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

*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_definitions`.
    

### GET Get Attribute Definition for Custom Object

`GET /custom_object_definitions/{object_type}/attribute_definitions/{id}`

Operation ID: `Get Attribute Definition for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Action to get attribute definition information.

This endpoint may return the following faults:

*   500 - AttributeDefinitionNotFoundException - Thrown in case the attribute definition does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) The object type id that contains these definitions
*   `id` (path, string, required) The id of the requested attribute definition.  
    Minimum length: 1.
*   `expand` (query, array of string) The expand "value" is available to retrieve value definitions of the attribute definition.
*   `select` (query, string) The selector for the get. If not passed, then the defaultSelector will be used instead.

#### Responses

*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **500** `AttributeDefinitionNotFoundException` - Thrown in case the attribute definition does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_definition`.
    

### PUT Create Attribute Definition for Custom Object

`PUT /custom_object_definitions/{object_type}/attribute_definitions/{id}`

Operation ID: `Create Attribute Definition for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Creates a attribute definition using the information provided.

This endpoint may return the following faults:

*   400 - AttributeDefinitionCreateException - if the attribute definition could not be created.
*   400 - AttributeDefinitionKeyReadOnlyException - Thrown when trying to create a key attribute of a custom object
*   400 - AttributeDefinitionLocalizableNotAllowedException - if trying to create a localizable attribute with a non-localizable type
*   400 - IdConflictException - if the Id in request is not the same as the ID in document.
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) The metadata object that contains these definitions
*   `id` (path, string, required) The id of the attribute definition to create.

#### Request body (required)

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

#### Responses

*   **400** `AttributeDefinitionCreateException` - if the attribute definition could not be created. or `AttributeDefinitionKeyReadOnlyException` - Thrown when trying to create a key attribute of a custom object or `AttributeDefinitionLocalizableNotAllowedException` - if trying to create a localizable attribute with a non-localizable type or `IdConflictException` - if the Id in request is not the same as the ID in document.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_definition`.
    

### DELETE Delete Attribute Definition for Custom Object

`DELETE /custom_object_definitions/{object_type}/attribute_definitions/{id}`

Operation ID: `Delete Attribute Definition for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Deletes the attribute definition by ID

This endpoint may return the following faults:

*   400 - AttributeDefinitionKeyReadOnlyException - Thrown when trying to delete a key attribute of custom object
*   400 - AttributeDefinitionReadOnlyException - Thrown when trying to delete a internal attribute of custom object
*   500 - AttributeDefinitionNotFoundException - Thrown in case the attribute definition does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) The metadata object that contains these definitions
*   `id` (path, string, required) Attribute definition id to remove  
    Minimum length: 1.

#### Responses

*   **204**
*   **400** `AttributeDefinitionKeyReadOnlyException` - Thrown when trying to delete a key attribute of custom object or `AttributeDefinitionReadOnlyException` - Thrown when trying to delete a internal attribute of custom object
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **500** `AttributeDefinitionNotFoundException` - Thrown in case the attribute definition does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Update Attribute Definition for Custom Object

`PATCH /custom_object_definitions/{object_type}/attribute_definitions/{id}`

Operation ID: `Update Attribute Definition for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Updates the attribute definition with the specified information.

This endpoint may return the following faults:

*   400 - AttributeDefinitionKeyReadOnlyException - Thrown when trying to modify a key attribute of custom object
*   400 - AttributeDefinitionPropertyReadOnlyException - Thrown in case a read only system attribute it tried to be changed, which is not allowed.
*   500 - AttributeDefinitionNotFoundException - Thrown in case the attribute definition does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) The object type id that contains these definitions
*   `id` (path, string, required) The id of the requested attribute definition.  
    Minimum length: 1.
*   `If-Match` (header, string)

#### Request body (required)

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

#### Responses

*   **400** `AttributeDefinitionKeyReadOnlyException` - Thrown when trying to modify a key attribute of custom object or `AttributeDefinitionPropertyReadOnlyException` - Thrown in case a read only system attribute it tried to be changed, which is not allowed.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **500** `AttributeDefinitionNotFoundException` - Thrown in case the attribute definition does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_definition`.
    

### POST Search Attribute Groups for Custom Object

`POST /custom_object_definitions/{object_type}/attribute_group_search`

Operation ID: `Search Attribute Groups for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Searches for attribute groups.

The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

*   id - String
    
*   display\_name - Localized < String >
    
*   description - Localized < String >
    
*   position - Double
    
*   internal - Boolean
    

The output of the query can also be sorted. These are the list of sortable attributes:

*   id - String
    
*   display\_name - Localized < String >
    
*   description - Localized < String >
    
*   position - Double
    
*   internal - Boolean
    

This endpoint may return the following faults:

*   400 - MalformedSearchParameterException - Thrown if the query is ill-formed.
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required)

#### Request body (required)

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

#### Responses

*   **400** `MalformedSearchParameterException` - Thrown if the query is ill-formed.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_group_search_result`.
    

### GET Get Attribute Groups for Custom Object

`GET /custom_object_definitions/{object_type}/attribute_groups`

Operation ID: `Get Attribute Groups for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Action to get all the attribute groups with no filtering.

This endpoint may return the following faults:

*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required)
*   `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.
*   `expand` (query, array of string)

#### Responses

*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_groups`.
    

### PUT Assign Custom Object Attribute Definition to Attribute Group

`PUT /custom_object_definitions/{object_type}/attribute_groups/{group_id}/attribute_definitions/{def_id}`

Operation ID: `Assign Custom Object Attribute Definition to Attribute Group`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Assign an attribute definition to an attribute group.

This endpoint may return the following faults:

*   500 - AttributeDefinitionNotFoundException - Indicates the specified attribute definition is not found.
*   404 - AttributeGroupNotFoundException - Indicates the specified attribute group is not found.
*   404 - ObjectTypeNotFoundException - Indicates the specified custom object is not found.

#### Parameters

*   `object_type` (path, string, required) The ID of the custom object that contains the attribute definition and attribute group.
*   `group_id` (path, string, required) The ID of the attribute group.  
    Minimum length: 1.
*   `def_id` (path, string, required) The ID of the attribute definition.  
    Minimum length: 1.

#### Responses

*   **204**
*   **404** `AttributeGroupNotFoundException` - Indicates the specified attribute group is not found. or `ObjectTypeNotFoundException` - Indicates the specified custom object is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **500** `AttributeDefinitionNotFoundException` - Indicates the specified attribute definition is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### DELETE Un-assign Custom Object Attribute Definition from Attribute Group

`DELETE /custom_object_definitions/{object_type}/attribute_groups/{group_id}/attribute_definitions/{def_id}`

Operation ID: `Un-assign Custom Object Attribute Definition from Attribute Group`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Un-assign an attribute definition from an attribute group.

This endpoint may return the following faults:

*   500 - AttributeDefinitionNotFoundException - Indicates the specified attribute definition is not found.
*   404 - AttributeGroupNotFoundException - Indicates the specified attribute group is not found.
*   404 - ObjectTypeNotFoundException - Indicates the specified custom object is not found.

#### Parameters

*   `object_type` (path, string, required) The ID of the custom object that contains the attribute definition and attribute group.
*   `group_id` (path, string, required) The ID of the attribute group.  
    Minimum length: 1.
*   `def_id` (path, string, required) The ID of the attribute definition.  
    Minimum length: 1.

#### Responses

*   **204**
*   **404** `AttributeGroupNotFoundException` - Indicates the specified attribute group is not found. or `ObjectTypeNotFoundException` - Indicates the specified custom object is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **500** `AttributeDefinitionNotFoundException` - Indicates the specified attribute definition is not found.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### GET Get Attribute Group for Custom Object

`GET /custom_object_definitions/{object_type}/attribute_groups/{id}`

Operation ID: `Get Attribute Group for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Action to get attribute group information.

This endpoint may return the following faults:

*   404 - AttributeGroupNotFoundException - Thrown in case the attribute group does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) the object type id that contains this attribute group
*   `id` (path, string, required) The id of the requested attribute group.  
    Minimum length: 1.
*   `select` (query, string)
*   `expand` (query, array of string)

#### Responses

*   **404** `AttributeGroupNotFoundException` - Thrown in case the attribute group does not exist matching the given id or `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_group`.
    

### PUT Create Attribute Group for Custom Object

`PUT /custom_object_definitions/{object_type}/attribute_groups/{id}`

Operation ID: `Create Attribute Group for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Creates a attribute group using the information provided.

This endpoint may return the following faults:

*   400 - IdConflictException - when the id in the body does not match that provided in the URL
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) the object type id that contains this attribute group
*   `id` (path, string, required) The id of the attribute group to create.  
    Minimum length: 1.

#### Request body (required)

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

#### Responses

*   **400** `IdConflictException` - when the id in the body does not match that provided in the URL
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_group`.
    

### DELETE Delete Attribute Groups for Custom Object

`DELETE /custom_object_definitions/{object_type}/attribute_groups/{id}`

Operation ID: `Delete Attribute Groups for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Deletes the attribute group by ID

This endpoint may return the following faults:

*   404 - AttributeGroupNotFoundException - Thrown in case the attribute group does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) the object type id that contains this attribute group
*   `id` (path, string, required) One attribute group id to remove

#### Responses

*   **204**
*   **404** `AttributeGroupNotFoundException` - Thrown in case the attribute group does not exist matching the given id or `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### PATCH Update Attribute Group for Custom Object

`PATCH /custom_object_definitions/{object_type}/attribute_groups/{id}`

Operation ID: `Update Attribute Group for Custom Object`. Tags: custom\_object\_definitions. Security: oauth2\_application.

Updates the attribute group with the specified information.

This endpoint may return the following faults:

*   404 - AttributeGroupNotFoundException - Thrown in case the attribute group does not exist matching the given id
*   404 - ObjectTypeNotFoundException - Thrown in case the object type cannot be found

#### Parameters

*   `object_type` (path, string, required) the object type id that contains this attribute group
*   `id` (path, string, required) The id of the requested attribute group.  
    Minimum length: 1.
*   `If-Match` (header, string)

#### Request body (required)

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

#### Responses

*   **404** `AttributeGroupNotFoundException` - Thrown in case the attribute group does not exist matching the given id or `ObjectTypeNotFoundException` - Thrown in case the object type cannot be found
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `object_attribute_group`.
    

## Schemas

### search\_request

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields that each query supports are defined within the search resource.

*   `count` (_integer (int32)_) The number of returned documents  
    Minimum: 1. Maximum: 200.
*   `db_start_record_` (_integer (int32)_) The zero-based index of the record that we want to start with, used to optimize special handling  
    Minimum: 0.
*   `expand` (_array of string_) List of expansions to be applied to each search results. Expands are optional
*   `query` (_query_, required) The query to apply
*   `select` (_string_) The field to be selected.
*   `sorts` (_array of sort_) The list of sort clauses configured for the search request. Sort clauses are optional.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.

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

### object\_attribute\_definition\_search\_result

Document representing an attributedefinition search result.

*   `count` (_integer (int32)_) The number of returned documents
*   `data` (_array of object_)
*   `db_start_record_` (_integer (int32)_) The zero-based index of the record that we want to start with, used to optimize special handling  
    Minimum: 0.
*   `expand` (_array of string_) List of expansions to be applied to each search results. Expands are optional
*   `hits` (_array of object\_attribute\_definition_) The sorted array of search hits. Can be empty.
*   `next` (_result\_page_) The data that can be used (as parameters on the search request) to retrieve the next result page.
*   `previous` (_result\_page_) The data that can be used (as parameters on the search request) to retrieve the previous result page.
*   `query` (_query_) The query passed into the search
*   `select` (_string_) The field to be selected.
*   `sorts` (_array of sort_) The list of sort clauses configured for the search request. Sort clauses are optional.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The number of returned documents

_Example_

```
{
  "count": 2,
  "hits": [
    {
      "description": {
        "default": "Description",
        "es": "mia description"
      },
      "display_name": {
        "default": "default name",
        "es": "nombre"
      },
      "id": "my-attributedefinition1",
      "key": false,
      "link": "https://example.com/s/-/dw/data/{version}/custom_object_definitions/Global_String/attribute_definitions/my-attributedefinition1",
      "localizable": true,
      "mandatory": false,
      "queryable": true,
      "searchable": false,
      "site_specific": false,
      "system": false,
      "value_type": "string",
      "visible": false
    },
    {
      "display_name": {
        "default": "second name",
        "fr": "non de plume"
      },
      "id": "my-attributedefinition2",
      "key": true,
      "link": "https://example.com/s/-/dw/data/{version}/custom_object_definitions/Global_String/attribute_definitions/my-attributedefinition2",
      "localizable": true,
      "mandatory": true,
      "queryable": true,
      "searchable": true,
      "site_specific": false,
      "system": false,
      "value_type": "string",
      "visible": true
    }
  ],
  "query": {
    "text_query": {
      "fields": [
        "id",
        "description"
      ],
      "search_phrase": "my"
    }
  },
  "select": "**",
  "start": 0,
  "total": 2
}
```

### object\_attribute\_definitions

Document representing an unfiltered list of object attribute definitions.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of object\_attribute\_definition_)
*   `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.

### object\_attribute\_definition

Document representing a attribute definition

*   `creation_date` (_string (date-time)_)
*   `default_value` (_object\_attribute\_value\_definition_) The default value of this attribute. It can be updated, but not created.
*   `description` (_object (localized)_) The localized description of the attribute.
    
    Additional properties: `string`.
    
*   `display_name` (_object (localized)_) The localized name presented to the user in forms.
    
    Additional properties: `string`.
    
*   `effective_id` (_string_) The effective ID, which is c\_id if the attribute is custom, and just the id otherwise. It is read only.
*   `externally_defined` (_boolean_) Flag indicating if this attribute is externally defined.
*   `externally_managed` (_boolean_) Flag indicating if this attribute is externally managed.
*   `field_height` (_integer (int32)_) The height of the field for this attribute in the editor.
*   `field_length` (_integer (int32)_) The length of the field for this attribute in the editor.
*   `id` (_string_) The user supplied ID of the attribute.
*   `key` (_boolean_) Flag indicating if this is a key attribute.
*   `last_modified` (_string (date-time)_)
*   `link` (_string_) The URL that is used to get this instance. Value is computed and read-only.
*   `localizable` (_boolean_) Flag indicating if this attribute can be localized.
*   `mandatory` (_boolean_) Flag indicating if a value is mandatory for the attribute.
*   `max_value` (_number (double)_) The maximum possible value for this attribute.
*   `min_length` (_integer (int32)_) The minimum length of the field for this attribute.
*   `min_value` (_number (double)_) The minimum possible value for this attribute.
*   `multi_value_type` (_boolean_)
    
    True if the attribute can have multiple values.
    
    Attributes of the following types are multi-value capable:
    
    *   set\_of\_int
        
    *   set\_of\_number
        
    *   set\_of\_string
        
    
    Additionally, attributes of the following types can be multi-value enabled:
    
    *   enum\_of\_int
        
    *   enum\_of\_string
        
*   `order_required` (_boolean_) Flag indicating if this attribute is required for order of the attribute model's product. The set of these can be used in order line items.
*   `queryable` (_boolean_) Returns true if the attribute definition is explicitly marked queryable. If no explicit queryable is found and the attribute value type belongs to a queryable type, true is returned too. In all other cases false is returned. Value is computed and read-only.
*   `read_only` (_boolean_) Flag indicating if this attribute is read-only. It is read only.
*   `regular_expression` (_string_) A regular expression that defines the legal values for this attribute.
*   `requires_encoding` (_boolean_) Flag indicating if this attribute can be encoded using the encoding="off" flag in ISML templates. It is read only.
*   `scale` (_integer (int32)_) The minimum number of fraction digits for a value of this attribute.
*   `searchable` (_boolean_) Flag indicating if this attribute is searchable.
*   `set_value_type` (_boolean_) Flag indicating if this attribute is of type 'Set of'. It is read only.
*   `site_specific` (_boolean_) Flag indicating if this attribute is site-specific.
*   `system` (_boolean_) Flag indicating if this attribute is a system attribute.
*   `unit` (_object (localized)_) The unit of measure for this attribute.
    
    Additional properties: `string`.
    
*   `value_definitions` (_array of object\_attribute\_value\_definition_) A set of values that are possible for this attribute. It is read only.
*   `value_type` (_string_) The type of this attribute.  
    Allowed values: `string`, `int`, `double`, `text`, `html`, `date`, `image`, `boolean`, `money`, `quantity`, `datetime`, `email`, `password`, `set_of_string`, `set_of_int`, `set_of_double`, `enum_of_string`, `enum_of_int`, `unknown`.
*   `visible` (_boolean_) Flag indicating if this attribute is visible.

_Example_

```
{
  "description": {
    "default": "Description",
    "es": "mia description"
  },
  "display_name": {
    "default": "default name",
    "es": "nombre"
  },
  "id": "MyAttributeDefinition",
  "key": false,
  "link": "https://example.com/s/-/dw/data/{version}/custom_object_definitions/Global_String/attribute_definitions/MyAttributeDefinition",
  "localizable": true,
  "mandatory": false,
  "queryable": true,
  "searchable": false,
  "site_specific": false,
  "system": false,
  "value_type": "string",
  "visible": false
}
```

### object\_attribute\_group\_search\_result

Document representing a attributegroup search result.

*   `count` (_integer (int32)_) The number of returned documents
*   `data` (_array of object_)
*   `db_start_record_` (_integer (int32)_) The zero-based index of the record that we want to start with, used to optimize special handling  
    Minimum: 0.
*   `expand` (_array of string_) List of expansions to be applied to each search results. Expands are optional
*   `hits` (_array of object\_attribute\_group_) The sorted array of search hits. Can be empty.
*   `next` (_result\_page_) The data that can be used (as parameters on the search request) to retrieve the next result page.
*   `previous` (_result\_page_) The data that can be used (as parameters on the search request) to retrieve the previous result page.
*   `query` (_query_) The query passed into the search
*   `select` (_string_) The field to be selected.
*   `sorts` (_array of sort_) The list of sort clauses configured for the search request. Sort clauses are optional.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The number of returned documents

_Example_

```
{
  "count": 2,
  "hits": [
    {
      "definitions_count": 5,
      "description": {
        "de": "A German my-description",
        "default": "my-description",
        "en": "An English my-description"
      },
      "display_name": {
        "de": "A German my-display_name",
        "default": "my-display_name",
        "en": "An English my-display_name"
      },
      "id": "my-attributegroup1",
      "internal": false,
      "link": "https://example.com/s/-/dw/data/{version}/custom_object_definitions/Global_String/attribute_groups/my-attributegroup1",
      "position": 1
    },
    {
      "definitions_count": 12,
      "display_name": {
        "default": "my-display_name"
      },
      "id": "my-attributegroup2",
      "internal": false,
      "link": "https://example.com/s/-/dw/data/{version}/custom_object_definitions/Global_String/attribute_groups/my-attributegroup2",
      "position": 2
    }
  ],
  "query": {
    "text_query": {
      "fields": [
        "id",
        "description"
      ],
      "search_phrase": "my"
    }
  },
  "select": "**",
  "start": 0,
  "total": 2
}
```

### object\_attribute\_groups

Document representing an unfiltered list of object group definitions.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of object\_attribute\_group_)
*   `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.

### object\_attribute\_group

Document representing a attribute group

*   `attribute_definitions` (_array of object\_attribute\_definition_) Attributes with the group displayed when expand=definition
*   `attribute_definitions_count` (_integer (int32)_) The count of the attributes within the group. This is a computed attribute and is read-only
*   `creation_date` (_string (date-time)_)
*   `description` (_object (localized)_) The free-form text description of the group by locale
    
    Additional properties: `string`.
    
*   `display_name` (_object (localized)_) The name used to display the group by locale.
    
    Additional properties: `string`.
    
*   `id` (_string_) The group's user specified identifier, used to retrieve the group
*   `internal` (_boolean_) True if the group is meant only for internal use, false otherwise. This property is read-only.
*   `last_modified` (_string (date-time)_)
*   `link` (_string_) URL that is used to get this instance. This is a computed attribute and is read-only
*   `position` (_number (double)_) The position of the group relative to other groups.  
    Minimum: 0.

_Example_

```
{
  "definitions_count": 17,
  "description": {
    "de": "A German my-description",
    "default": "my-description",
    "en": "An English my-description"
  },
  "display_name": {
    "de": "A German my-display_name",
    "default": "my-display_name",
    "en": "An English my-display_name"
  },
  "id": "my-attributegroup",
  "internal": false,
  "link": "https://example.com/s/-/dw/data/{version}/custom_objects/Global_String/attribute_groups/my-attributegroup",
  "position": 1
}
```

### query

Document representing a query. A query contains a set of objects that define criteria used to select records. A query can contain one of the following:

*   match\_all\_query - returns all records.
    
*   term\_query - matches records where a field (or fields) exactly match some simple value (including null).
    
*   text\_query - matches records where a field (or fields) contain a search phrase.
    
*   boolean\_query - formulates a complex boolean expression using query objects as criteria.
    
*   filtered\_query - allows for filtering of records based on both a query and a filter.
    

Type: `any`.

### sort

Document representing a sort request.

*   `field` (_string_, required) The name of the field to sort on.
*   `sort_order` (_string_) The sort order to be applied when sorting. When omitted, the default sort order (ASC) is used.  
    Allowed values: `asc`, `desc`.

_Example_

```
{
  "field": "id",
  "sort_order": "asc"
}
```

### cause

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

### result\_page

Data that can be used to get the next and previous page of a Data API results object.

*   `count` (_integer (int32)_) The number of returned documents.
*   `db_start_record_` (_integer (int32)_) The zero-based index of the record that we want to start with, used to optimize special handling
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.

### object\_attribute\_value\_definition

Document representing a attribute definition

*   `description` (_object (localized)_) A description of the attribute value.
    
    Additional properties: `string`.
    
*   `display_value` (_object (localized)_) A display name that can be used to present this value in the user interface. For example, the value might be '1' but the display name might be 'Order Exported'.
    
    Additional properties: `string`.
    
*   `id` (_string_) The ID of the attribute value.
*   `position` (_number (double)_) The position of the attribute value within the set of attribute values.
*   `value` (_object_) The value of the attribute.

_Example_

```
{
  "display_value": {
    "default": "Enum Of String Value 1"
  },
  "id": "EnumOfStringValue1",
  "position": 0,
  "value": "EnumOfStringValue1"
}
```

### bool\_filter

Document representing a boolean filter.

A boolean filter allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is configured with a boolean operator (AND, OR, NOT) and a list of filters the operator relates to. If multiple filters are given to a boolean NOT operator, this is interpreted as a NOT upon a boolean OR of the given filters.

**Example:** (id="myId" AND coupon\_id="couponOne")

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
bool\_filter: {
operator: "and",
filters: \[
{ term\_filter: { field: "id", operator: "is", values: \["myId"\] } },
{ term\_filter: { field: "coupon\_id", operator: "is", values: \["couponOne"\] } }
\]
}
}
}
}

**Example:** (id="holidaySale" OR redemption\_count BETWEEN(1, 20)

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
bool\_filter: {
operator: "or",
filters: \[
{ term\_filter: { field: "id", operator: "is", values: \["holidaySale"\] } },
{ range\_filter: { field: "redemption\_count", from: 1, to: 20 } }
\]
}
}
}
}

**Example:** NOT(enabled=false OR coupon\_id="special")

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
bool\_filter: {
operator: "not",
filters: \[
{ term\_filter: { field: "enabled", operator: "is", values: \[false\] } },
{ term\_filter: { field: "coupon\_id", operator: "is", values: \["special"\] } }
\]
}
}
}
}

*   `filters` (_array of filter_) A list of filters, which are logically combined by an operator.
*   `operator` (_string_, required) The logical operator the filters are combined with.  
    Allowed values: `and`, `or`, `not`.

### bool\_query

A boolean query allows construction of full logical expression trees consisting of other queries (usually term and text queries). A boolean query basically has 3 sets of clauses that 'must', 'should' and / or 'must not' match. If 'must', 'must\_not', or 'should' appear in the same boolean query, they are combined logically using the AND operator. The difference between must and should operators is that the must operator requires all subqueries to match whereas the should operator only requires one match

**Example:** (id = 'foo' AND description LIKE 'bar')

query: {
bool\_query: {
must: \[
{ term\_query: { fields: \["id"\], operator: "is", values: \["foo"\] } },
{ text\_query: { fields: \["description"\], search\_phrase: "bar" } }
\]
}
}

**Example:** (id = 'foo' OR description LIKE 'bar')

query: {
bool\_query: {
should: \[
{ term\_query: { fields: \["id"\], operator: "is", values: \["foo"\] } },
{ text\_query: { fields: \["description"\], search\_phrase: "bar" } }
\]
}
}

**Example:** (NOT (id = 'foo' AND description LIKE 'bar'))

query: {
bool\_query: {
must\_not: \[
{ term\_query: { fields: \["id"\], operator: "is", values: \["foo"\] } },
{ text\_query: { fields: \["description"\], search\_phrase: "bar" } }
\]
}
}

**Example:** ((coupon\_id LIKE "limit" AND description LIKE "limit per customer") AND NOT (enabled=false))

query: {
bool\_query: {
must: \[
{ text\_query: { fields: \[ "coupon\_id" \], search\_phrase: "limit" } },
{ text\_query: { fields: \[ "description" \], search\_phrase: "limit per customer" } }
\],
must\_not: \[
{ term\_query: { fields: \[ "enabled" \], operator: "is", values: \[false\] } }
\]
}
}

*   `must` (_array of query_) List of queries that must match.
*   `must_not` (_array of query_) List of queries that must not match.
*   `should` (_array of query_) List of queries that should match (i.e., at least one query must match).

### filter

Document representing a filter.

A filter contains a set of objects that define criteria used to select records. A filter can contain one of the following:

*   term\_filter - matches records where a field (or fields) exactly match some simple value (including null).
    
*   range\_filter - matches records where a field value lies in a specified range.
    
*   query\_filter - provides filtering based on a query.
    
*   bool\_filter - provides filtering of records using a set of filters combined with a specified operator.
    

Type: `any`.

### filtered\_query

A filtered query allows to filter the result of a (possibly complex) query using a (possibly complex) filter.

**Example:**

query : {
filtered\_query: {
query: {
text\_query: { fields: \["coupon\_id"\], search\_phrase: "disabled" }
},
filter: {
term\_filter: {
field: "enabled", operator: "is", values: \[ false \]
}
}
}
}

*   `filter` (_filter_, required) The (possibly complex) filter object.
*   `query` (_query_, required) The query object.

### match\_all\_query

A match all query simply matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints.

**Example:**

query: {
match\_all\_query: {}
}

Type: `any`.

### nested\_query

A nested query queries nested documents that are part of a larger document. The classical example is a product master with variants (in one big document) where you want to constrain a search to masters that have variants that match multiple constraints (like color = blue AND size = M). This query is not compatible with some search types. **Example:** finds all the documents that has firstname = "John" and lastname = "Doe"

{
"query": {
"bool\_query": {
"must": \[
{
"nested\_query": {
"path": "order.shipping\_addresses",
"query": {
"bool\_query": {
"must": \[
{
"bool\_query": {
"must": \[
{
"term\_query": {
"fields": \[ "order.shipping\_addresses.first\_name" \],
"operator": "is",
"values": \[ "John" \]
}
}
\]
}
},
{
"bool\_query": {
"must": \[
{
"term\_query": {
"fields": \[ "order.shipping\_addresses.last\_name" \],
"operator": "is",
"values": \[ "Doe" \]
}
}
\]
}
}
\]
}
},
"score\_mode": "avg"
}
}
\]
}
}
}

*   `path` (_string_, required)
*   `query` (_query_, required)
*   `score_mode` (_string_)  
    Allowed values: `avg`, `total`, `max`, `none`.

### query\_filter

Document representing a query filter. A query filter wraps any query and allows it to be used as a filter.

**Example:** (coupon\_id contains "disabled" AND (enabled=false OR active=false))

query : {
filtered\_query: {
query: { text\_query: { fields: \["coupon\_id"\], search\_phrase: "disabled" } },
filter: {
query\_filter: {
query: {
term\_query: { fields: \["enabled","active"\], operator: "is", values: \[ false \] }
}
}
}
}
}

*   `query` (_query_, required) The query to use as a filter.

### range2\_filter

Document representing a range comparison with a range filter, named Range2Filter.

A Range2Filter allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.

The first range (R1) is defined by a pair of attributes ("from\_field" and "to\_field") that specify the extent of a range, such as the attributes "valid\_from" and "valid\_to".

The second range (R2) is defined by "from\_value" and "to\_value".

The filter mode specifies the method used to compare the two ranges:

*   overlap: R1 overlaps fully or partially with R2
    
*   containing: R1 contains R2
    
*   contained: R1 is contained in R2
    

The range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended (at one end only). You can configure whether the lower and upper bounds are inclusive or exclusive.

A range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.

**Example:** (valid dates overlap with the range January 1, 2007 through January 1, 2017)

"query" : {
"filtered\_query": {
"filter": {
"range2\_filter": {
"from\_field": "valid\_from",
"to\_field": "valid\_to",
"filter\_mode":"overlap",
"from\_value": "2007-01-01T00:00:00.000Z",
"to\_value": "2017-01-01T00:00:00.000Z"
}
},
"query": { "match\_all\_query": {} }
}
}

*   `filter_mode` (_string_) Compare mode: overlap, containing, or contained. If not specified, the default is overlap.  
    Allowed values: `overlap`, `containing`, `contained`.
*   `from_field` (_string_, required) The field name of the field that starts the first range.
*   `from_inclusive` (_boolean_) Indicates whether the lower bound of the second range is inclusive. If not specified, the default is true. Set to false to make the lower bound exclusive.
*   `from_value` (_object_) The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.
*   `to_field` (_string_, required) The field name of the field that ends the first range.
*   `to_inclusive` (_boolean_) Indicates whether the upper bound of the second range is inclusive. If not specified, the default is true. Set to false to make the lower bound exclusive.
*   `to_value` (_object_) The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.

### range\_filter

Document representing a range filter.

A range filter allows you to restrict a search result to hits that have values for a given attribute that fall into a given value range. The range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended (at one end only). You can configure whether the lower and upper bounds are inclusive or exclusive.

A range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.

**Example:** ( redemption\_count BETWEEN (0,10\] )

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
range\_filter: {
field: "redemption\_count",
from: 0,
to: 10,
from\_inclusive: false
}
}
}
}

*   `field` (_string_, required) The search field.
*   `from` (_object_) The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.
*   `from_inclusive` (_boolean_) Indicates whether the lower bound of the range is inclusive. If not specified, the default is true. Set to false to make the lower bound exclusive.
*   `to` (_object_) The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.
*   `to_inclusive` (_boolean_) Indicates whether the upper bound of the range is inclusive. If not specified, the default is true. Set to false to made the upper bound exclusive.

### term\_filter

Document representing a term filter.

A term filter allows you to restrict a search result to hits that match (exactly) one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criterion you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.

**Example:** (id="my\_id")

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
term\_filter: {
field: "id",
operator: "is",
values: \["my\_id"\]
}
}
}
}

**Example:** (id IN ("my\_id","other\_id"))

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
term\_filter: {
field: "id",
operator: "one\_of",
values: \["my\_id","other\_id"\]
}
}
}
}

**Example:** (description=NULL)

query: {
filtered\_query: {
query: { match\_all\_query: {} },
filter: {
term\_filter: {
field: "description",
operator: "is\_null"
}
}
}
}

*   `field` (_string_, required) The filter field.
*   `operator` (_string_, required) The operator to compare the field's values with the given ones.  
    Allowed values: `is`, `one_of`, `is_null`, `is_not_null`, `less`, `greater`, `not_in`, `neq`.
*   `values` (_array of object_) The filter values.

### term\_query

A term query matches one (or more) value(s) against one (or more) document field(s). A document is considered a hit if one of the values matches (exactly) with at least one of the given fields. The operator "is" can only take one value, while "one\_of" can take multiple values. If multiple fields are specified, they are combined using the OR operator. The `less` and `greater` operators are not compatible with some search types. To query based on numeric bounds in those cases, you can use a range filter on a filtered query .

**Elastic only** : If used with multiple fields, the query is internally handled as a boolean OR of DisjointMaxQueries (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.

**Example:** (id="my\_id")

query: {
term\_query: {
fields: \["id"\],
operator: "is",
values: \["my\_id"\]
}
}

**Example:** (id IN ("my\_id","other\_id"))

query: {
term\_query: {
fields: \["id"\],
operator: "one\_of",
values: \["my\_id","other\_id"\]
}
}

**Example:** (id=null)

query: {
term\_query: {
fields: \["description"\],
operator: "is\_null"
}
}

**Example:** ((id IN ('generic', 'keyword')) OR (description IN ('generic', 'keyword'))

query: {
term\_query: {
fields: \["id", "description"\],
operator: "one\_of",
values: \["generic","keyword"\]
}
}

*   `fields` (_array of string_, required) The document field(s) the value(s) are matched against, combined with the operator.  
    Minimum items: 1.
*   `operator` (_string_, required) Returns the operator to use for the term query.  
    Allowed values: `is`, `one_of`, `is_null`, `is_not_null`, `less`, `greater`, `not_in`, `neq`.
*   `values` (_array of object_) The values the field(s) are compared against, combined with the operator.

### text\_query

A text query is used to match some text (i.e. a search phrase possibly consisting of multiple terms) against one or multiple fields. In case multiple fields are provided, the phrase conceptually forms a logical OR over the fields. In this case, the terms of the phrase basically have to match the text that would result from concatenating all given fields.

**Example:** (coupon\_id contains "xmas" )

query: {
text\_query: {
fields: \["coupon\_id"\],
search\_phrase: "xmas"
}
}

**Example:** (coupon\_id contains "xmas" OR description contains "xmas")

query: {
text\_query: {
fields: \["description", "coupon\_id"\],
search\_phrase: "xmas"
}
}

**Example:** (description contains "holiday" AND description contains "bojo")

query: {
text\_query: {
fields: \["description"\],
search\_phrase: "holiday bogo"
}
}

*   `fields` (_array of string_, required) The document fields the search phrase has to match.  
    Minimum items: 1.
*   `search_phrase` (_string_, required) A search phrase which may consist of multiple terms.