---
schema_version: "1"
id: 1e93da8210079bb47c152bbb7a960b2dbb20efae18d2b89cdf80cf2783e3573e
title: Object Definitions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/references/generated-api-specs/object-definitions.md
canonical_url: https://developer.salesforce.com/docs/commerce/commerce-api/references/object-definitions
source_site: developer.salesforce.com
content_type: documentation
content_hash: 88cea940ab494963fa68359fbf3a1242ae1fb52135801eb22ec38f866fb40890
products:
  - B2C Commerce API
  - Salesforce APIs
---
Object Definitions

# Object Definitions

[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/object-definitions/object-definitions-oas-v1-public.yaml)

## API Overview

Use the Object Definitions API to search for and manage attribute definitions for object types in B2C Commerce. Discover and inspect the metadata structure of objects such as Product, Customer, and Order.

Use this API to:

*   Search attribute definitions with complex queries
*   Filter by attribute properties (type, searchability, visibility, etc.)
*   Retrieve detailed metadata about attribute definitions
*   Discover available values for enum-type attributes

### Authentication & Authorization

The Object Definitions API requires valid authentication and authorization to be accessed. It uses an Account Manager OAuth 2.0 bearer token for authentication.

The necessary scope for accessing the Object Definitions API is:

*   `sfcc.object-definitions.rw`: Provides read-write access.

You must include the relevant scope in the client ID used to generate the token. For details, see [Authorization Scopes Catalog](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html).

### Response Details

#### Timeouts

Admin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)

#### Error Handling

Error responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)

**Version:** 1.1.3

## Servers

*   `https://{shortCode}.api.commercecloud.salesforce.com/dx/object-definitions/v1`
    *   `shortCode (default shortCode) An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)`

## Security

*   `AmOAuth2` (oauth2) Account Manager OAuth 2.0 bearer token Authentication.
    *   OAuth flow clientCredentials (tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token)
    *   Scope sfcc.object-definitions: System Object Definitions Read SCOPE
    *   Scope sfcc.object-definitions.rw: System Object Definitions Read and Write SCOPE
    *   OAuth flow authorizationCode (authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize, tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token, refreshUrl: https://account.demandware.com/dwsso/oauth2/access\_token)

## Operations

### GET Get system object types

`GET /organizations/{organizationId}/system/object-types`

Operation ID: `getSystemObjectTypes`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a paginated list of all system object type definitions.

Use the `select` parameter to specify which properties to include in the response. Use `offset` and `limit` for pagination.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `select` (query, Select)
    
    _Example: select_
    
    ```
    (**)
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** Successfully returned system object types
    
    Media type: `application/json`. Schema: `ObjectTypeDefinitionResult`.
    
    _Example: SystemObjectTypeResultExample_ List of system object types
    
    ```
    {
      "limit": 3,
      "offset": 0,
      "total": 85,
      "data": [
        {
          "objectType": "Product",
          "displayName": {
            "default": "Product"
          },
          "description": {
            "default": "Object type representing products."
          },
          "readOnly": false,
          "queryable": false,
          "contentObject": true,
          "attributeDefinitionCount": 166,
          "attributeGroupCount": 8
        },
        {
          "objectType": "Order",
          "displayName": {
            "default": "Order"
          },
          "description": {
            "default": "Object type representing orders."
          },
          "readOnly": false,
          "queryable": true,
          "contentObject": false,
          "attributeDefinitionCount": 120,
          "attributeGroupCount": 5
        },
        {
          "objectType": "Customer",
          "displayName": {
            "default": "Customer"
          },
          "description": {
            "default": "Object type representing customers."
          },
          "readOnly": false,
          "queryable": true,
          "contentObject": false,
          "attributeDefinitionCount": 45,
          "attributeGroupCount": 3
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ObjectTypeNotFoundExample_
    
    ```
    {
      "title": "Object Type Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/object-type-not-found",
      "detail": "No object type with ID 'InvalidObjectType' could be found.",
      "objectType": "InvalidObjectType"
    }
    ```
    

### POST Search system object types

`POST /organizations/{organizationId}/system/object-types-search`

Operation ID: `searchSystemObjectTypes`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Searches system object type definitions based on the provided query criteria.

**Searchable fields:**

*   objectType (String)
*   display\_name\* (Localized String)
*   description\* (Localized String)
*   read\_only (boolean)

**Sortable fields:**

*   objectType
*   display\_name
*   description
*   read\_only

\*Note: Localized fields are searched across all locales.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

The search request for system object types

Media type: `application/json`. Schema: `SearchRequest`.

_Example: SearchSystemObjectTypes_ Search system object types by object type

```
{
  "query": {
    "textQuery": {
      "fields": [
        "objectType"
      ],
      "searchPhrase": "Customer"
    }
  }
}
```

#### Responses

*   **200** Successfully returned system object type search results
    
    Media type: `application/json`. Schema: `ObjectTypeDefinitionSearchResult`.
    
    _Example: SystemObjectTypeSearchResultExample_ System object type search result
    
    ```
    {
      "limit": 1,
      "offset": 0,
      "total": 1,
      "hits": [
        {
          "objectType": "Customer",
          "displayName": {
            "default": "Customer"
          },
          "description": {
            "default": "Object type representing customers."
          },
          "readOnly": false,
          "queryable": true,
          "contentObject": false,
          "attributeDefinitionCount": 45,
          "attributeGroupCount": 3
        }
      ]
    }
    ```
    
*   **400** Field Not Sortable
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: FieldNotSortableExample_
    
    ```
    {
      "title": "Field Not Sortable",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/field-not-sortable",
      "detail": "The field 'link' can't be used to sort the results."
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    

### GET Get system object type

`GET /organizations/{organizationId}/system/object-types/{objectType}`

Operation ID: `getSystemObjectType`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a single system object type definition by its identifier.

Use the `select` parameter to specify which properties to include in the response. Use the `expand` parameter to include related resources.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.

#### Responses

*   **200** Successfully returned the system object type
    
    Media type: `application/json`. Schema: `ObjectTypeDefinition`.
    
    _Example: SystemObjectTypeExample_ Single system object type
    
    ```
    {
      "objectType": "Product",
      "displayName": {
        "default": "Product"
      },
      "description": {
        "default": "Object type representing products."
      },
      "readOnly": false,
      "queryable": false,
      "searchable": true,
      "contentObject": true,
      "attributeDefinitionCount": 166,
      "attributeGroupCount": 8
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### POST Search attribute definitions for system object

`POST /organizations/{organizationId}/system/object-types/{objectType}/attribute-definition-search`

Operation ID: `searchAttributeDefinitionForSystemObject`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Searches the attribute definitions of the specified system object type.

The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets:

**Main bucket:**

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

**Definition version bucket:**

*   localizable (boolean)
*   site\_specific (boolean)
*   value\_type (enum)

**Group bucket:**

*   group (String)

\*Note: These attributes are not searchable or sortable for built-in system attributes. They work normally for non-system attributes.

Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining localizable and description, only a conjunction is allowed (AND).

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.

#### Request body (required)

The search request for attribute definitions

Media type: `application/json`. Schema: `SearchRequest`.

_Example: SearchByValueType_ Search by value type using term query

```
{
  "query": {
    "termQuery": {
      "fields": [
        "value_type"
      ],
      "operator": "is",
      "values": [
        "string"
      ]
    }
  },
  "limit": 25,
  "offset": 0
}
```

_Example: SearchWithSorting_ Search all with sorting by ID

```
{
  "query": {
    "matchAllQuery": {}
  },
  "limit": 100,
  "offset": 0,
  "sorts": [
    {
      "field": "id",
      "sortOrder": "asc"
    }
  ]
}
```

#### Responses

*   **200** Successfully returned attribute definition search results
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinitionSearchResult`.
    
    _Example: ObjectAttributeDefinitionSearchResultExample_ Successful attribute definition search result
    
    ```
    {
      "limit": 2,
      "hits": [
        {
          "id": "color",
          "effectiveId": "c_color",
          "displayName": {
            "default": "Color"
          },
          "description": {
            "default": "The color of the product"
          },
          "key": false,
          "mandatory": false,
          "localizable": false,
          "siteSpecific": false,
          "searchable": true,
          "queryable": true,
          "valueType": "enum_of_string",
          "visible": true,
          "system": false,
          "multiValueType": false,
          "setValueType": false,
          "externallyManaged": false,
          "externallyDefined": false,
          "orderRequired": false,
          "requiresEncoding": false,
          "readOnly": false,
          "valueDefinitions": [
            {
              "id": "red",
              "value": "red",
              "displayValue": {
                "default": "Red"
              },
              "position": 1
            },
            {
              "id": "blue",
              "value": "blue",
              "displayValue": {
                "default": "Blue"
              },
              "position": 2
            }
          ]
        },
        {
          "id": "size",
          "effectiveId": "c_size",
          "displayName": {
            "default": "Size"
          },
          "description": {
            "default": "The size of the product"
          },
          "key": false,
          "mandatory": true,
          "localizable": false,
          "siteSpecific": false,
          "searchable": true,
          "queryable": true,
          "valueType": "string",
          "visible": true,
          "system": false,
          "multiValueType": false,
          "setValueType": false,
          "externallyManaged": false,
          "externallyDefined": false,
          "orderRequired": false,
          "requiresEncoding": false,
          "readOnly": false
        }
      ],
      "offset": 0,
      "total": 2
    }
    ```
    
*   **400** Field Not Sortable
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example FieldNotSortableExample: same as POST /organizations/{organizationId}/system/object-types-search 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### POST Search attribute groups for system object

`POST /organizations/{organizationId}/system/object-types/{objectType}/attribute-group-search`

Operation ID: `searchAttributeGroupsForSystemObject`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Searches the attribute groups of the specified system object type.

**Searchable fields:**

*   id (String)
*   display\_name (Localized String)
*   description (Localized String)
*   internal (boolean)
*   position (number)

**Sortable fields:**

*   id
*   display\_name
*   description
*   internal
*   position

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.

#### Request body (required)

The search request for attribute groups

Media type: `application/json`. Schema: `SearchRequest`.

_Example: SearchAttributeGroups_ Search attribute groups

```
{
  "query": {
    "matchAllQuery": {}
  },
  "limit": 25,
  "offset": 0
}
```

_Example: SearchAttributeGroupsByDisplayName_ Search attribute groups by display name

```
{
  "query": {
    "textQuery": {
      "fields": [
        "display_name"
      ],
      "searchPhrase": "custom"
    }
  },
  "limit": 25,
  "offset": 0
}
```

#### Responses

*   **200** Successfully returned attribute group search results
    
    Media type: `application/json`. Schema: `ObjectAttributeGroupSearchResult`.
    
    _Example: ObjectAttributeGroupSearchResultExample_ Attribute group search result
    
    ```
    {
      "limit": 1,
      "offset": 0,
      "total": 1,
      "hits": [
        {
          "id": "SiteMap",
          "displayName": {
            "default": "Site Map"
          },
          "description": {
            "default": "Site map attributes"
          },
          "position": 3,
          "internal": false,
          "attributeDefinitionsCount": 3
        }
      ]
    }
    ```
    
*   **400** Field Not Sortable
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example MalformedSearchParameterExample: same as POST /organizations/{organizationId}/system/object-types-search 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### GET Get attribute groups

`GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups`

Operation ID: `getAttributeGroups`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a paginated list of attribute groups for the specified system object type.

Use the `select` parameter to specify which properties to include in the response. Use the `expand` parameter with value `definition` to include attribute definitions. Use `offset` and `limit` for pagination.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `select` (query, Select)
    
    _Example: select_
    
    ```
    (**)
    ```
    
*   `expand` (query, string) Specifies which related resources to include in the response. For attribute groups, use `definition` to include attribute definitions.  
    Maximum length: 256. Example: `definition`.
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** Successfully returned attribute groups
    
    Media type: `application/json`. Schema: `ObjectAttributeGroupResult`.
    
    _Example: ObjectAttributeGroupResultExample_ List of attribute groups
    
    ```
    {
      "limit": 3,
      "offset": 0,
      "total": 8,
      "data": [
        {
          "id": "custom-attributes",
          "displayName": {
            "default": "Custom Attributes"
          },
          "description": {
            "default": "Custom attributes for the object"
          },
          "position": 1,
          "internal": false,
          "attributeDefinitionsCount": 5
        },
        {
          "id": "marketing",
          "displayName": {
            "default": "Marketing"
          },
          "description": {
            "default": "Marketing related attributes"
          },
          "position": 2,
          "internal": false,
          "attributeDefinitionsCount": 10
        },
        {
          "id": "SiteMap",
          "displayName": {
            "default": "Site Map"
          },
          "description": {
            "default": "Site map attributes"
          },
          "position": 3,
          "internal": false,
          "attributeDefinitionsCount": 3
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### GET Get attribute group

`GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id}`

Operation ID: `getAttributeGroup`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a single attribute group by its identifier.

Use the `select` parameter to specify which properties to include in the response. Use the `expand` parameter with value `definition` to include attribute definitions.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.
*   `select` (query, Select)
    
    _Example: select_
    
    ```
    (**)
    ```
    
*   `expand` (query, string) Specifies which related resources to include in the response. For attribute groups, use `definition` to include attribute definitions.  
    Maximum length: 256. Example: `definition`.

#### Responses

*   **200** Successfully returned the attribute group
    
    Media type: `application/json`. Schema: `ObjectAttributeGroup`.
    
    _Example: ObjectAttributeGroupExample_ Single attribute group
    
    ```
    {
      "id": "custom-attributes",
      "displayName": {
        "default": "Custom Attributes",
        "en": "Custom Attributes",
        "de": "Benutzerdefinierte Attribute"
      },
      "description": {
        "default": "Custom attributes for the object"
      },
      "position": 1,
      "internal": false,
      "attributeDefinitionsCount": 5
    }
    ```
    
    _Example: ObjectAttributeGroupWithDefinitionsExample_ Attribute group with expanded attribute definitions
    
    ```
    {
      "id": "custom-attributes",
      "displayName": {
        "default": "Custom Attributes"
      },
      "description": {
        "default": "Custom attributes for the object"
      },
      "position": 1,
      "internal": false,
      "attributeDefinitionsCount": 2,
      "attributeDefinitions": [
        {
          "id": "color",
          "displayName": {
            "default": "Color"
          },
          "valueType": "enum_of_string",
          "visible": true,
          "system": false
        },
        {
          "id": "size",
          "displayName": {
            "default": "Size"
          },
          "valueType": "string",
          "visible": true,
          "system": false
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Group Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: AttributeGroupNotFoundExample_
    
    ```
    {
      "title": "Attribute Group Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/attribute-group-not-found",
      "detail": "No attribute group with ID 'invalid_group' could be found."
    }
    ```
    

### PUT Create or replace attribute group

`PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id}`

Operation ID: `createOrReplaceAttributeGroup`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Creates a new attribute group or replaces an existing one with the specified identifier.

Returns 201 if a new attribute group was created, or 200 if an existing one was replaced.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.

#### Request body (required)

The attribute group data

Media type: `application/json`. Schema: `ObjectAttributeGroup`.

_Example: CreateAttributeGroup_ Create an attribute group

```
{
  "displayName": {
    "default": "New Attribute Group",
    "en": "New Attribute Group",
    "de": "Neue Attributgruppe"
  },
  "description": {
    "default": "A new group for custom attributes"
  },
  "position": 5
}
```

_Example: CreateAttributeGroupWithInternal_ Create an internal attribute group

```
{
  "displayName": {
    "default": "Internal Group"
  },
  "description": {
    "default": "An internal attribute group"
  },
  "position": 10
}
```

#### Responses

*   **200** Successfully replaced the attribute group
    
    Media type: `application/json`. Schema: `ObjectAttributeGroup`.
    
    _Example ObjectAttributeGroupExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 200 response._ Single attribute group
    
    _Example: ObjectAttributeGroupExample_ Single attribute group
    
*   **201** Successfully created the attribute group
    
    Media type: `application/json`. Schema: `ObjectAttributeGroup`.
    
    _Example: ObjectAttributeGroupCreatedExample_ Attribute group created successfully
    
    ```
    {
      "id": "new-group",
      "displayName": {
        "default": "New Group",
        "en": "New Group"
      },
      "description": {
        "default": "A new attribute group"
      },
      "position": 6,
      "internal": false,
      "attributeDefinitionsCount": 0
    }
    ```
    
*   **400** Invalid Request
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: IdConflictExample_
    
    ```
    {
      "title": "Id Conflict",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/id-conflict",
      "detail": "The ID in the request body ('attributegroupId') doesn't match the ID in the URL ('differentId')."
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### DELETE Delete attribute group

`DELETE /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id}`

Operation ID: `deleteAttributeGroup`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Deletes an attribute group by its identifier.

This operation cannot be undone. All attribute definitions will be unassigned from the group but will not be deleted.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.

#### Responses

*   **204** Successfully deleted the attribute group
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Group Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example AttributeGroupNotFoundExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 404 response._
    

### PATCH Update attribute group

`PATCH /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id}`

Operation ID: `updateAttributeGroup`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Partially updates an existing attribute group.

Only the properties provided in the request body will be updated.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.

#### Request body (required)

The attribute group data to update

Media type: `application/json`. Schema: `ObjectAttributeGroup`.

_Example: UpdateAttributeGroup_ Update an attribute group

```
{
  "displayName": {
    "default": "Updated Group Name"
  },
  "description": {
    "default": "Updated description"
  },
  "position": 3
}
```

_Example: UpdateAttributeGroupPosition_ Update attribute group position

```
{
  "position": 1
}
```

#### Responses

*   **200** Successfully updated the attribute group
    
    Media type: `application/json`. Schema: `ObjectAttributeGroup`.
    
    _Example ObjectAttributeGroupExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 200 response._ Single attribute group
    
    _Example: ObjectAttributeGroupExample_ Single attribute group
    
*   **400** Invalid Request
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: MalformedRequestBodyExample_
    
    ```
    {
      "title": "Bad Request",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "detail": "An error occurred while decoding the request, the body was '{ invalid json }'."
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Group Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example AttributeGroupNotFoundExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 404 response._
    

### PUT Assign attribute definition to group

`PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId}`

Operation ID: `assignAttributeDefinitionToGroup`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Assigns an attribute definition to an attribute group.

The attribute definition must exist for the specified system object type. An attribute definition can be assigned to multiple groups.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `groupId` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.
*   `defId` (path, string, required) The unique identifier of the attribute definition to assign or unassign.  
    Minimum length: 1. Maximum length: 256. Example: `color`.

#### Responses

*   **204** Successfully assigned the attribute definition to the group
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Resource Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    
    _Example AttributeGroupNotFoundExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 404 response._
    
    _Example: AttributeDefinitionNotFoundExample_
    
    ```
    {
      "title": "Attribute Definition Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/attribute-definition-not-found",
      "detail": "No attribute definition with ID 'invalid_attribute' for object 'Product' could be found.",
      "attributeDefinitionId": "invalid_attribute",
      "objectType": "Product"
    }
    ```
    

### DELETE Unassign attribute definition from group

`DELETE /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId}`

Operation ID: `unassignAttributeDefinitionFromGroup`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Removes an attribute definition from an attribute group.

This operation only removes the assignment; the attribute definition itself is not deleted.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `groupId` (path, string, required) The unique identifier of the attribute group.  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.
*   `defId` (path, string, required) The unique identifier of the attribute definition to assign or unassign.  
    Minimum length: 1. Maximum length: 256. Example: `color`.

#### Responses

*   **204** Successfully unassigned the attribute definition from the group
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Resource Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    
    _Example AttributeGroupNotFoundExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 404 response._
    
    _Example AttributeDefinitionNotFoundExample: same as PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId} 404 response._
    

### GET Get attribute definitions

`GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions`

Operation ID: `getAttributeDefinitions`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a paginated list of attribute definitions for the specified system object type.

Use the `select` parameter to specify which properties to include in the response. Use `offset` and `limit` for pagination.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `select` (query, Select)
    
    _Example: select_
    
    ```
    (**)
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** Successfully returned attribute definitions
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinitionResult`.
    
    _Example: ObjectAttributeDefinitionResultExample_ List of attribute definitions
    
    ```
    {
      "limit": 2,
      "offset": 0,
      "total": 50,
      "data": [
        {
          "id": "color",
          "effectiveId": "c_color",
          "displayName": {
            "default": "Color"
          },
          "description": {
            "default": "The color of the product"
          },
          "key": false,
          "mandatory": false,
          "localizable": false,
          "siteSpecific": false,
          "searchable": true,
          "queryable": true,
          "valueType": "enum_of_string",
          "visible": true,
          "system": false
        },
        {
          "id": "size",
          "effectiveId": "c_size",
          "displayName": {
            "default": "Size"
          },
          "description": {
            "default": "The size of the product"
          },
          "key": false,
          "mandatory": true,
          "localizable": false,
          "siteSpecific": false,
          "searchable": true,
          "queryable": true,
          "valueType": "string",
          "visible": true,
          "system": false
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### GET Get attribute definition

`GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id}`

Operation ID: `getAttributeDefinition`. Security: AmOAuth2 (sfcc.object-definitions, sfcc.object-definitions.rw).

Retrieves a single attribute definition by its identifier.

Use the `select` parameter to specify which properties to include in the response. Use the `expand` parameter to include related resources.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute definition.  
    Minimum length: 1. Maximum length: 256. Example: `color`.
*   `select` (query, Select)
    
    _Example: select_
    
    ```
    (**)
    ```
    
*   `expand` (query, string) Specifies which related resources to include in the response. For attribute groups, use `definition` to include attribute definitions.  
    Maximum length: 256. Example: `definition`.

#### Responses

*   **200** Successfully returned the attribute definition
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinition`.
    
    _Example: ObjectAttributeDefinitionExample_ Single attribute definition
    
    ```
    {
      "id": "color",
      "effectiveId": "c_color",
      "displayName": {
        "default": "Color",
        "en": "Color"
      },
      "description": {
        "default": "The color of the product",
        "en": "The color of the product"
      },
      "key": false,
      "mandatory": false,
      "localizable": true,
      "siteSpecific": false,
      "searchable": true,
      "queryable": true,
      "valueType": "enum_of_string",
      "visible": true,
      "system": false,
      "multiValueType": false,
      "setValueType": false,
      "externallyManaged": false,
      "externallyDefined": false,
      "orderRequired": false,
      "requiresEncoding": false,
      "readOnly": false,
      "valueDefinitions": [
        {
          "id": "red",
          "value": "red",
          "displayValue": {
            "default": "Red"
          },
          "position": 1
        },
        {
          "id": "blue",
          "value": "blue",
          "displayValue": {
            "default": "Blue"
          },
          "position": 2
        }
      ],
      "creationDate": "2024-01-15T10:30:00Z",
      "lastModified": "2024-01-15T10:30:00Z"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Definition Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example AttributeDefinitionNotFoundExample: same as PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId} 404 response._
    

### PUT Create or replace attribute definition

`PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id}`

Operation ID: `createOrReplaceAttributeDefinition`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Creates a new attribute definition or replaces an existing one with the specified identifier.

Returns 201 if a new attribute definition was created, or 200 if an existing one was replaced.

**Important:** The `valueType` property is required when creating a new attribute definition and cannot be changed after creation.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute definition.  
    Minimum length: 1. Maximum length: 256. Example: `color`.

#### Request body (required)

The attribute definition data

Media type: `application/json`. Schema: `ObjectAttributeDefinition`.

_Example: CreateAttributeDefinitionString_ Create a string attribute definition

```
{
  "id": "c_customString",
  "displayName": {
    "default": "Custom String Attribute",
    "en": "Custom String Attribute"
  },
  "description": {
    "default": "A custom string attribute"
  },
  "localizable": true,
  "siteSpecific": false,
  "searchable": true,
  "visible": true,
  "valueType": "string"
}
```

_Example: CreateAttributeDefinitionEnum_ Create an enum attribute definition

```
{
  "id": "c_productStatus",
  "displayName": {
    "default": "Product Status",
    "en": "Product Status"
  },
  "description": {
    "default": "The status of the product"
  },
  "localizable": false,
  "siteSpecific": false,
  "searchable": true,
  "visible": true,
  "valueType": "enum_of_string"
}
```

_Example: CreateAttributeDefinitionNumber_ Create a numeric attribute definition

```
{
  "id": "c_weight",
  "displayName": {
    "default": "Weight"
  },
  "description": {
    "default": "The weight of the product"
  },
  "localizable": false,
  "siteSpecific": false,
  "searchable": true,
  "visible": true,
  "valueType": "double",
  "unit": {
    "default": "kg"
  }
}
```

_Example: CreateAttributeDefinitionImage_ Create an image attribute definition

```
{
  "id": "c_customImage",
  "displayName": {
    "default": "Custom Image",
    "en": "Custom Image"
  },
  "description": {
    "default": "A custom image attribute"
  },
  "localizable": true,
  "siteSpecific": false,
  "visible": true,
  "valueType": "image"
}
```

#### Responses

*   **200** Successfully replaced the attribute definition
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinition`.
    
    _Example ObjectAttributeDefinitionExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id} 200 response._ Single attribute definition
    
    _Example: ObjectAttributeDefinitionExample_ Single attribute definition
    
*   **201** Successfully created the attribute definition
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinition`.
    
    _Example: ObjectAttributeDefinitionCreatedExample_ Attribute definition created successfully
    
    ```
    {
      "id": "custom-attribute",
      "effectiveId": "c_custom-attribute",
      "displayName": {
        "default": "Custom Attribute"
      },
      "description": {
        "default": "A custom attribute for the product"
      },
      "key": false,
      "mandatory": false,
      "localizable": true,
      "siteSpecific": false,
      "searchable": true,
      "queryable": true,
      "valueType": "string",
      "visible": true,
      "system": false,
      "multiValueType": false,
      "setValueType": false,
      "externallyManaged": false,
      "externallyDefined": false,
      "orderRequired": false,
      "requiresEncoding": false,
      "readOnly": false,
      "creationDate": "2024-01-15T10:30:00Z",
      "lastModified": "2024-01-15T10:30:00Z"
    }
    ```
    
*   **400** Invalid Request
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: InvalidValueTypeExample_
    
    ```
    {
      "title": "Bad Request",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
      "detail": "An error occurred while decoding the request. There's an unknown property 'internal' in document 'ObjectAttributeDefinition'."
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Object Type Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example ObjectTypeNotFoundExample: same as GET /organizations/{organizationId}/system/object-types 404 response._
    

### DELETE Delete attribute definition

`DELETE /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id}`

Operation ID: `deleteAttributeDefinition`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Deletes an attribute definition by its identifier.

This operation cannot be undone. The attribute definition will be removed from all attribute groups and all values for this attribute will be deleted.

**Important:** System attributes cannot be deleted.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute definition.  
    Minimum length: 1. Maximum length: 256. Example: `color`.

#### Responses

*   **204** Successfully deleted the attribute definition
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Definition Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example AttributeDefinitionNotFoundExample: same as PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId} 404 response._
    

### PATCH Update attribute definition

`PATCH /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id}`

Operation ID: `updateAttributeDefinition`. Security: AmOAuth2 (sfcc.object-definitions.rw).

Partially updates an existing attribute definition.

Only the properties provided in the request body will be updated.

**Important:** The `valueType` property cannot be changed after creation. System attributes have limited modifiable properties.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `objectType` (path, string, required) The system object type identifier (e.g., Product, Order, Customer)  
    Minimum length: 1. Maximum length: 256. Example: `Product`.
*   `id` (path, string, required) The unique identifier of the attribute definition.  
    Minimum length: 1. Maximum length: 256. Example: `color`.

#### Request body (required)

The attribute definition data to update

Media type: `application/json`. Schema: `ObjectAttributeDefinition`.

_Example: UpdateAttributeDefinition_ Update an attribute definition

```
{
  "id": "c_customString",
  "displayName": {
    "default": "Updated Display Name"
  },
  "description": {
    "default": "Updated description"
  },
  "searchable": false,
  "visible": false
}
```

#### Responses

*   **200** Successfully updated the attribute definition
    
    Media type: `application/json`. Schema: `ObjectAttributeDefinition`.
    
    _Example ObjectAttributeDefinitionExample: same as GET /organizations/{organizationId}/system/object-types/{objectType}/attribute-definitions/{id} 200 response._ Single attribute definition
    
    _Example: ObjectAttributeDefinitionExample_ Single attribute definition
    
*   **400** Invalid Request
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example MalformedRequestBodyExample: same as PATCH /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{id} 400 response._
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** Attribute Definition Not Found
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example AttributeDefinitionNotFoundExample: same as PUT /organizations/{organizationId}/system/object-types/{objectType}/attribute-groups/{groupId}/attribute-definitions/{defId} 404 response._
    

## Schemas

### OrganizationId

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Type: `string`.

Pattern: ^f\_ecom\_\[a-z\]{4}\_(prd|stg|dev|s\[0-9\]{2}|\[0-9\]{3})$. Example: `f_ecom_zzxy_prd`.

### Select

The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html).

Type: `string`.

Minimum length: 1. Pattern: ^\[(\].\*\[)\]$. Example: `(name,id,variationAttributes.(**))`.

### ObjectTypeDefinitionResult

Document representing a paginated collection of object type definition

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of ObjectTypeDefinition_) List of system object types

### ErrorResponse

*   `title` (_string_, required) A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization  
    Maximum length: 256. Example: `You do not have enough credit`.
*   `type` (_string_, required) A URI reference \[RFC3986\] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML \[W3C.REC-html5-20141028\]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `NotEnoughMoney`.
*   `detail` (_string_, required) A human-readable explanation specific to this occurrence of the problem.  
    Example: `Your current balance is 30, but that costs 50`.
*   `instance` (_string_) A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `/account/12345/msgs/abc`.

### SearchRequest

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

*   `limit` (_integer (int32)_) Maximum records to retrieve per request, not to exceed 200.  
    Minimum: 1. Maximum: 200. Example: `10`.
*   `query` (_Query_, required)
*   `sorts` (_array of Sort_) The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.
*   `offset` (_Offset_)

### ObjectTypeDefinitionSearchResult

Document representing a system object type search result

Includes all fields of `PaginatedResultBase`.

*   `hits` (_array of ObjectTypeDefinition_, required) List of system object types matching the search criteria

### ObjectTypeDefinition

Document representing a system object type definition

*   `objectType` (_string_) The unique identifier of the system object type  
    Maximum length: 256. Example: `Product`.
*   `displayName` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Product",
      "de": "Produkt",
      "en": "Product"
    }
    ```
    
*   `description` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    }
    ```
    
*   `readOnly` (_boolean_, read-only) Flag indicating if this object type is read-only  
    Example: `false`.
*   `queryable` (_boolean_) Flag indicating if this object type can be queried  
    Example: `true`.
*   `searchable` (_boolean_) Flag indicating if this object type is searchable  
    Example: `true`.
*   `contentObject` (_boolean_) Flag indicating if this is a content object  
    Example: `true`.
*   `attributeDefinitionCount` (_integer (int32)_, read-only) The number of attribute definitions for this object type  
    Example: `150`.
*   `attributeGroupCount` (_integer (int32)_, read-only) The number of attribute groups for this object type  
    Example: `8`.

### ObjectAttributeDefinitionSearchResult

Document representing an attribute definition search result

Includes all fields of `PaginatedResultBase`.

*   `hits` (_array of ObjectAttributeDefinition_, required) List of object attribute definitions

### ObjectAttributeGroupSearchResult

Document representing an attribute group search result

Includes all fields of `PaginatedResultBase`.

*   `hits` (_array of ObjectAttributeGroup_, required) List of object attribute groups

### ObjectAttributeGroupResult

Document representing a paginated collection of attribute groups

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of ObjectAttributeGroup_) List of object attribute groups

### ObjectAttributeGroup

Document representing an attribute group

*   `id` (_string_) The unique identifier of the attribute group  
    Minimum length: 1. Maximum length: 256. Example: `custom-attributes`.
*   `displayName` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Product",
      "de": "Produkt",
      "en": "Product"
    }
    ```
    
*   `description` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    }
    ```
    
*   `position` (_number (double)_) The position of the attribute group  
    Example: `1`.
*   `internal` (_boolean_, read-only) Flag indicating if this is an internal attribute group  
    Example: `false`.
*   `attributeDefinitionsCount` (_integer (int32)_, read-only) The number of attribute definitions in this group  
    Example: `5`.
*   `attributeDefinitions` (_array of ObjectAttributeDefinition_) The attribute definitions in this group. Only populated when expand=definition is specified.
*   `creationDate` (_string (date-time)_, read-only) The date/time when the attribute definition was created  
    Example: `2024-01-15T10:30:00Z`.
*   `lastModified` (_string (date-time)_, read-only) The date/time when the attribute definition was last modified  
    Example: `2024-01-15T11:00:00Z`.

### ObjectAttributeDefinitionResult

Document representing a paginated collection of attribute definitions

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of ObjectAttributeDefinition_) List of object attribute definitions

### ObjectAttributeDefinition

Document representing an attribute definition

*   `id` (_string_, required) The user supplied ID of the attribute  
    Minimum length: 1. Maximum length: 256. Example: `color`.
*   `effectiveId` (_string_, read-only) The effective ID, which is c\_id if the attribute is custom, and just the id otherwise  
    Maximum length: 256. Example: `c_color`.
*   `displayName` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Product",
      "de": "Produkt",
      "en": "Product"
    }
    ```
    
*   `description` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    }
    ```
    
*   `key` (_boolean_) Flag indicating if this is a key attribute  
    Example: `false`.
*   `mandatory` (_boolean_) Flag indicating if a value is mandatory for the attribute  
    Example: `false`.
*   `localizable` (_boolean_) Flag indicating if this attribute can be localized  
    Example: `false`.
*   `siteSpecific` (_boolean_) Flag indicating if this attribute is site-specific  
    Example: `false`.
*   `searchable` (_boolean_) Flag indicating if this attribute is searchable  
    Example: `true`.
*   `queryable` (_boolean_, read-only) Returns true if the attribute definition is explicitly marked queryable or if the attribute value type belongs to a queryable type. Computed and read-only.  
    Example: `true`.
*   `valueType` (_ValueType_)
*   `visible` (_boolean_) Flag indicating if this attribute is visible  
    Example: `true`.
*   `system` (_boolean_) Flag indicating if this attribute is a system attribute  
    Example: `false`.
*   `unit` (_object_) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "General unit",
      "de": "Allgemeine Einheit",
      "en": "General unit"
    }
    ```
    
*   `requiresEncoding` (_boolean_, read-only) Flag indicating if this attribute can be encoded using the encoding='off' flag in ISML templates  
    Example: `false`.
*   `multiValueType` (_boolean_) True if the attribute can have multiple values. Applicable to set\_of\_\* and enum\_of\_\* types.  
    Example: `false`.
*   `setValueType` (_boolean_, read-only) Flag indicating if this attribute is of type 'Set of'  
    Example: `false`.
*   `externallyManaged` (_boolean_) Flag indicating if this attribute is externally managed  
    Example: `false`.
*   `externallyDefined` (_boolean_) Flag indicating if this attribute is externally defined  
    Example: `false`.
*   `orderRequired` (_boolean_) Flag indicating if this attribute is required for order of the attribute model's product  
    Example: `false`.
*   `regularExpression` (_string_, read-only) A regular expression that defines the legal values for this attribute  
    Maximum length: 4000. Example: `^[a-zA-Z]+$`.
*   `fieldLength` (_integer (int32)_, read-only) The length of the field for this attribute in the editor  
    Example: `50`.
*   `fieldHeight` (_integer (int32)_, read-only) The height of the field for this attribute in the editor  
    Example: `1`.
*   `minLength` (_integer (int32)_, read-only) The minimum length of the field for this attribute  
    Example: `1`.
*   `readOnly` (_boolean_, read-only) Flag indicating if this attribute is read-only  
    Example: `false`.
*   `minValue` (_number (double)_, read-only) The minimum possible value for this attribute  
    Example: `0`.
*   `maxValue` (_number (double)_, read-only) The maximum possible value for this attribute  
    Example: `100`.
*   `scale` (_integer (int32)_, read-only) The minimum number of fraction digits for a value of this attribute  
    Example: `2`.
*   `defaultValue` (_object_) The default value of this attribute. It can be updated, but not created.
    
    Includes all fields of `ObjectAttributeValueDefinition`.
    
*   `valueDefinitions` (_array of ObjectAttributeValueDefinition_, read-only) A set of values that are possible for this attribute
*   `creationDate` (_string (date-time)_, read-only) The date/time when the attribute definition was created  
    Example: `2024-01-15T10:30:00Z`.
*   `lastModified` (_string (date-time)_, read-only) The date/time when the attribute definition was last modified  
    Example: `2024-01-15T11:00:00Z`.

### PaginatedResultBase

Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. If you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.

Includes all fields of `ResultBase`.

*   `offset` (_Offset_, required)

### Query

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

*   `MatchAllQuery`

*   Matches all documents.

*   `TermQuery`

*   Matches one or more documents against one or more document fields.

*   `TextQuery`

*   Matches text against one or more fields.

*   `BoolQuery`

*   Allows construction of a logical expression of multiple queries.

*   `FilteredQuery`

*   Allows a filter to be applied to a query.

*   `NestedQuery`

*   Allows you to query on nested documents.
*   _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._

Minimum properties: 1. Maximum properties: 1.

*   `boolQuery` (_BoolQuery_)
*   `filteredQuery` (_FilteredQuery_)
*   `matchAllQuery` (_MatchAllQuery_)
*   `nestedQuery` (_NestedQuery_)
*   `termQuery` (_TermQuery_)
*   `textQuery` (_TextQuery_)

_Example_

```
{
  "filteredQuery": {
    "query": {
      "textQuery": {
        "fields": [
          "couponId"
        ],
        "searchPhrase": "disabled"
      }
    },
    "filter": {
      "termFilter": {
        "field": "enabled",
        "operator": "is",
        "values": [
          false
        ]
      }
    }
  }
}
```

### Sort

Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.

*   `field` (_string_, required) The name of the field to sort on.  
    Maximum length: 256. Example: `couponId`.
*   `sortOrder` (_string_) The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.  
    Allowed values: `asc`, `desc`. Default: `asc`. Example: `asc`.

_Example_

```
{
  "field": "couponId",
  "sortOrder": "desc"
}
```

### Offset

The zero-based index of the first hit/data to include in the result.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `0`.

### ValueType

The type of an attribute value

Type: `string`.

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`. Example: `string`.

### ObjectAttributeValueDefinition

An attribute definition value

*   `id` (_string_, read-only) The ID of the attribute value  
    Maximum length: 256. Example: `value-1`.
*   `value` (_string_, read-only) The value of the attribute  
    Maximum length: 4000. Example: `1`.
*   `displayValue` (_object_, read-only) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "One",
      "de": "Eins",
      "en": "One"
    }
    ```
    
*   `description` (_object_, read-only) B2C Commerce API - Localization doc: [https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html](https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html)
    
    Additional properties: `string`.
    
    Localized string
    
    Maximum length: 4000. Example: `Localized value`.
    
    _Example_
    
    ```
    {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    }
    ```
    
*   `position` (_number (double)_, read-only) The position of the attribute value within the set of attribute values  
    Example: `1`.

### ResultBase

Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.

*   `limit` (_integer (int32)_, required) Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.  
    Example: `10`.
*   `total` (_Total_, required)

### BoolQuery

A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:

*   `must`, which combines as an `AND` operator.
*   `should`, which combines as an `OR` operator.
*   `must_not`, which combines as a `NOT` operator.

If `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:

```
(must-1 AND must-1 AND ...)
  AND (should-1 OR should-2 OR ...)
  AND NOT (must_not-1 OR must_not-2 OR ...)
```

*   `must` (_array of Query_) List of queries to be evaluated as an `AND` operator.
*   `mustNot` (_array of Query_) List of queries to be evaluated as a `NOT` operator.
*   `should` (_array of Query_) List of queries to be evaluated as an `OR` operator.

_Example_

```
{
  "must": [
    {
      "textQuery": {
        "fields": [
          "couponId"
        ],
        "searchPhrase": "DEAL"
      }
    },
    {
      "textQuery": {
        "fields": [
          "description"
        ],
        "searchPhrase": "Big bargain deal"
      }
    }
  ],
  "mustNot": [
    {
      "termQuery": {
        "fields": [
          "enabled"
        ],
        "operator": "is",
        "values": [
          false
        ]
      }
    }
  ]
}
```

### FilteredQuery

Allows to filter the result of a possibly complex query using a possibly complex filter.

*   `filter` (_Filter_, required)
*   `query` (_Query_, required)

_Example_

```
{
  "query": {
    "textQuery": {
      "fields": [
        "couponId"
      ],
      "searchPhrase": "disabled"
    }
  },
  "filter": {
    "termFilter": {
      "field": "enabled",
      "operator": "is",
      "values": [
        false
      ]
    }
  }
}
```

### MatchAllQuery

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.

### NestedQuery

Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints.

A `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.

*   `path` (_string_, required) The path to the nested document.  
    Maximum length: 2048. Example: `order.shippingAddresses`.
*   `query` (_Query_, required)
*   `scoreMode` (_string_) Indicates how scores for matching child objects affect the root parent document’s relevance score.  
    Allowed values: `avg`, `total`, `max`, `none`. Example: `avg`.

_Example_

```
{
  "path": "order.shippingAddresses",
  "query": {
    "boolQuery": {
      "must": [
        {
          "boolQuery": {
            "must": [
              {
                "termQuery": {
                  "fields": [
                    "order.shippingAddresses.firstName"
                  ],
                  "operator": "is",
                  "values": [
                    "John"
                  ]
                }
              }
            ]
          }
        },
        {
          "boolQuery": {
            "must": [
              {
                "termQuery": {
                  "fields": [
                    "order.shippingAddresses.lastName"
                  ],
                  "operator": "is",
                  "values": [
                    "Doe"
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "scoreMode": "avg"
}
```

### TermQuery

A term query matches one or more values against one or more document fields. 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 a logical `OR` operator.

**Limitations:**

*   The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.
*   A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `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.

*   `fields` (_array of Field_, required) The document fields that the values 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`. Example: `is`.
*   `values` (_array of string | number | boolean | integer_) The values that the fields are compared against, combined with the operator.  
    Items: Example: `myCouponId`.

### TextQuery

A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When 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 within the text, that would result in concatenating all given fields.

*   `fields` (_array of Field_, required) The document fields that the search phrase matches against.  
    Minimum items: 1.
*   `searchPhrase` (_string_, required) A search phrase, which can include multiple terms separated by spaces.  
    Example: `campaign summer`.

_Example_

```
{
  "fields": [
    "couponId"
  ],
  "searchPhrase": "limit"
}
```

### Total

The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `10`.

### Filter

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

*   `TermFilter`

*   Matches records where a field (or fields) exactly matches some simple value (including `null`).

*   `RangeFilter`

*   Matches records where a field value lies within a specified range.

*   `Range2Filter`

*   Matches records in a specified range across fields.

*   `QueryFilter`

*   Matches records based on a query.

*   `BoolFilter`

*   Provides filtering of records using a set of filters combined using a logical operator.

Minimum properties: 1. Maximum properties: 1.

*   `boolFilter` (_BoolFilter_)
*   `queryFilter` (_QueryFilter_)
*   `range2Filter` (_Range2Filter_)
*   `rangeFilter` (_RangeFilter_)
*   `termFilter` (_TermFilter_)

### Field

Name of the field. Might be a custom field name prefixed with c\_.

Type: `string`.

Maximum length: 260. Example: `couponId`.

### BoolFilter

Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.

*   `filters` (_array of Filter_) A list of filters that are logically combined by an operator.
*   `operator` (_string_, required) The logical operator that is used to combine the filters.  
    Allowed values: `and`, `or`, `not`. Example: `and`.

_Example_

```
{
  "operator": "and",
  "filters": [
    {
      "termFilter": {
        "field": "id",
        "operator": "is",
        "values": [
          "myId"
        ]
      }
    },
    {
      "termFilter": {
        "field": "couponId",
        "operator": "is",
        "values": [
          "couponOne"
        ]
      }
    }
  ]
}
```

### QueryFilter

Wraps any query and allows it to be used as a filter.

*   `query` (_Query_, required)

### 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 (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.

The second range (R2) is defined by `fromValue` and `toValue`.

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, but only at one end of the range. You can configure whether the lower bounds 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.

*   `filterMode` (_string_) Compare mode: overlap, containing, or contained.  
    Allowed values: `overlap`, `containing`, `contained`. Default: `overlap`. Example: `overlap`.
*   `fromField` (_object_, required) The field name of the field that starts the first range.  
    Example: `validFrom`.
    
    Includes all fields of `Field`.
    
    Example: `validFrom`.
    
*   `fromInclusive` (_boolean_) A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `fromValue` (_any_) 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.  
    Example: `2007-01-01T00:00:00.000Z`.
*   `toField` (_object_, required) The field name of the field that ends the first range.  
    Example: `validTo`.
    
    Includes all fields of `Field`.
    
    Example: `validTo`.
    
*   `toInclusive` (_boolean_) A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `toValue` (_any_) 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.  
    Example: `2017-01-01T00:00:00.000Z`.

_Example_

```
{
  "fromField": "validFrom",
  "toField": "validTo",
  "filterMode": "overlap",
  "fromValue": "2007-01-01T00:00:00.000Z",
  "toValue": "2017-01-01T00:00:00.000Z"
}
```

### RangeFilter

Allows you to restrict a search result to hits that have values for a given attribute that fall within 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, but only at one end of the range. You can configure whether the lower bounds 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.

*   `field` (_object_, required) The search field.  
    Example: `validFrom`.
    
    Includes all fields of `Field`.
    
    Example: `validFrom`.
    
*   `from` (_string (date-time) | integer | number_) 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.
    
    One of: `string (date-time)`, `integer`, `number`.
    
    *   _string (date-time)_
        
        Type: `string (date-time)`.
        
        Example: `2007-01-01T00:00:00.000Z`.
        
    *   _integer_
        
        Type: `integer`.
        
        Example: `1`.
        
    *   _number_
        
        Type: `number`.
        
        Example: `1`.
        
*   `fromInclusive` (_boolean_) A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `to` (_string (date-time) | integer | number_) 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.
    
    One of: `string (date-time)`, `integer`, `number`.
    
    *   _string (date-time)_
        
        Type: `string (date-time)`.
        
        Example: `2007-01-02T00:00:00.000Z`.
        
    *   _integer_
        
        Type: `integer`.
        
        Example: `2`.
        
    *   _number_
        
        Type: `number`.
        
        Example: `2`.
        
*   `toInclusive` (_boolean_) A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.

### TermFilter

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

*   `field` (_object_, required) The filter field.
    
    Includes all fields of `Field`.
    
*   `operator` (_string_, required) The operator used to compare the field's values with the given values.  
    Allowed values: `is`, `one_of`, `is_null`, `is_not_null`, `less`, `greater`, `not_in`, `neq`. Example: `is`.
*   `values` (_array of string_) The filter values.  
    Items: Example: `myId`.

_Example_

```
{
  "field": "id",
  "operator": "is",
  "values": [
    "myId"
  ]
}
```