younifyd
Menu

Update Cors Preferences

Create or replace all CORS preferences for the given site.

PUT/organizations/{organizationId}/cors

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Update Cors Preferences action (under CORS (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{updateCorsPreferences.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.

Request body

Enter the body as JSON in the step's Body 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"
        ]
      ]
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{updateCorsPreferences.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.

Update Cors Preferences — Salesforce Commerce Cloud — Documentation