younifyd
Menu

Get Cors Preferences

Return all CORS preferences for the given site.

GET/organizations/{organizationId}/cors

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Cors Preferences action (under CORS (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{getCorsPreferences.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

Response

Returns 200 with an object. Read it in later steps with {{getCorsPreferences.response.data.<field>}}.

corsClientPreferencesarray<object>

List of client-specific CORS preferences

clientIdstringrequired

Client ID

originsarray<string>required

List containing allowed origins in the format '<scheme>://<domain>.<tld>'

json
{
  "corsClientPreferences": [
    {
      "clientId": "12345678-90ab-cdef-fedc-ba0987654321",
      "origins": [
        [
          "http://foo.com",
          "https://foo.bar.com",
          "myapp://example.com"
        ]
      ]
    }
  ]
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Get Cors Preferences — Salesforce Commerce Cloud — Documentation