Preferences

GET Retrieves the Global Custom Preferences.

GET /organizations/{organizationId}/global-custom-preferences

Operation ID: getGlobalCustomPreferenceList. Security: AmOAuth2 (sfcc.preferences, sfcc.preferences.rw).

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 and a 3-character instance type identifier.

    Example

    f_ecom_zzxy_prd
  • maskPassword (query, boolean) Whether to mask password or not.
    Default: false. Example: true.
  • limit (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 200.
    Default: 200. 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 Retrieved Global Custom Preferences successfully.

    Media type: application/json. Schema: CustomPreferenceList.

    Example: GlobalCustomPreferenceExample

    {
      "limit": 10,
      "data": [
        {
          "groupId": "PreferenceGroup1",
          "id": "booleanValue",
          "value": true
        },
        {
          "groupId": "PreferenceGroup1",
          "id": "htmlValue",
          "value": {
            "markup": "<h1>HTML Value</h1>",
            "source": "<h1>HTML Value</h1>"
          }
        },
        {
          "groupId": "PreferenceGroup1",
          "id": "dateValue",
          "value": "2007-06-20T00:00:00.000Z"
        },
        {
          "groupId": "PreferenceGroup2",
          "id": "integerValueValue",
          "value": 12345
        },
        {
          "groupId": "PreferenceGroup2",
          "id": "stringValueList",
          "value": "s1"
        },
        {
          "groupId": "PreferenceGroup2",
          "id": "imageValue",
          "value": {
            "abs_url": "https://localhost/on/demandware.static/-/Sites/default/v2d48bd5c705782218c66e02f6776751b2e227ac5/img/value.jpg",
            "dis_base_url": "https://image.demandware.com/dw/image/v2/zzzz_s02/on/demandware.static/-/Sites/default/v2d48bd5c705782218c66e02f6776751b2e227ac5/img/value.jpg",
            "path": "/img/value.jpg"
          }
        }
      ],
      "offset": 0,
      "total": 100
    }
  • 400 Returned if the query is ill-formed.
  • 401 Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.

    Media type: application/problem+json. Schema: ErrorResponse.

    Example: InvalidAccessToken

    {
      "title": "Invalid Access Token",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-access-token",
      "detail": "The request is unauthorized, the access token is invalid.",
      "accessToken": "hbGciOiJIUzI1NiIsInR5cCI6Ikp"
    }