SlotConfigurations Resource (Data API 16.2)

Summary

Http Method Resource Description
PUT /Sites/{Site_id}/Slots/{Slot_id}/Slot_configurations/{Configuration_id} Creates a new configuration for an existing slot. If a slot configuration exists with the specified configuration_id, slot_id, and context, the existing slot configuration is overwritten.
PATCH /Sites/{Site_id}/Slots/{Slot_id}/Slot_configurations/{Configuration_id} Updates an existing slot configuration. This action ignores the slot_id and the context information in the input document.
GET /Sites/{Site_id}/Slots/{Slot_id}/Slot_configurations/{Configuration_id} Action to read an existing slot configuration.
DELETE /Sites/{Site_id}/Slots/{Slot_id}/Slot_configurations/{Configuration_id} Removes a configuration for slot in a given context from a site.

Create Slot Configuration

Creates a new configuration for an existing slot. If a slot configuration exists with the specified configuration_id, slot_id, and context, the existing slot configuration is overwritten.

Url

PUT https://hostname:port/dw/data/v16_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}

Formats

json, xml

Request Document

SlotConfiguration

Response Document

SlotConfiguration

Path Parameters

Parameter Type Description Constraints
configuration_id String The id of the slot configuration. maxLength=256, minLength=1
site_id String The id of the site for which you want to create the slot configuration. maxLength=32, minLength=1
slot_id String The id of the slot. maxLength=256, minLength=1

Query Parameters

Parameter Type Description Constraints
context String The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). If you do not set this query parameter, the global context is used by default.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidContextTypeException

contextType (String)

Thrown if the specified context type is invalid.
400 MissingSlotConfigurationContextIdException   Thrown if the specified context id for given context 'category' or 'folder' is missing.
400 IdConflictException

bodyID (String)

urlID (String)

if the Id in request is not the same as the ID in document.
404 SlotNotFoundException

slotId (String)

contextType (Enum {global, category, folder})

siteId (String)

Thrown if there was no slot with the given id found for the requested site.

Sample

REQUEST:
PUT /s/-/dw/data/v16_2/sites/SiteGenesis/slots/header-banner/slot_configurations/2015-06-24_16%3A33%3A18?context=category%3Dmen_shoes HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
    "slot_content":
    {
        "type":"products",
        "product_ids":[
            "013742335484",
            "013742335422",
            "008885005196",
            "008885535495"
        ]
    },
    "customer_groups":[
        "Administrators",
        "Registered"
    ],
    "enabled":true, 
    "default":true, 
    "rank":2,
    "description":"slot configuration description", 
    "callout_msg":
    {
        "default":"Default message",
        "de-DE":"Deutsche Nachricht",
        "en-US":"US american message"
    }, 
    "schedule":
    {
        "start_date":"2013-03-28T23:21:00.000Z", 
        "end_date":"2022-03-28T23:21:00.000Z", 
        "recurrence":
        {
            "day_of_week":[
                "monday",
                "sunday"
            ], 
            "time_of_day":
            {
                "time_from":"00:00:00", 
                "time_to":"23:59:59"
            }
        }
    }
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Location: https://example.com/s/-/dw/data/v16_2/sites/SiteGenesis/slots/header-banner/slot_configurations/2015-06-24_16%3A33%3A18?context=category%3Dmen_shoes
Content-Type: application/json;charset=UTF-8
ETag: t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6
{
    "_v":"16.2",
   "_type" : "slot_configuration",
    "slot_id":"header-banner",
    "uuid":"fsdoi43ofijwdf",
    "configuration_id":"2015-06-24_16:33:18",
    "slot_content":
    {
        "type":"products",
        "product_ids":[
            "013742335484",
            "013742335422",
            "008885005196",
            "008885535495"
        ]
    }, 
    "customer_groups":[
        "Administrators",
        "Registered"
    ],
    "assigned_to_site" : true,
    "context":"category", 
    "context_id":"men_shoes", 
    "enabled":true, 
    "default":true, 
    "rank":2,
    "description":"slot configuration description", 
    "callout_msg":
    {
        "default":"some message",
        "de-DE":"Deutsche Nachricht",
        "en-US":"US american message"
    }, 
    "schedule":
    {
        "start_date":"2013-03-28T23:21:00.000Z", 
        "end_date":"2022-03-28T23:21:00.000Z", 
        "recurrence":
        {
            "day_of_week":[
                "monday",
                "sunday"
            ], 
            "time_of_day":
            {
                "time_from":"00:00:00", 
                "time_to":"23:59:00"
            }
        }
    }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
{
  "_v":"16.2",
   "_type":"fault",
  "fault":
  {
    "type":"SlotConfigurationNotFoundException",
    "message":"No slot configuration with id '2015-06-24_16:33:18' found for site 'SiteGenesis'."
  }
}

Update Slot Configuration

Updates an existing slot configuration. This action ignores the slot_id and the context information in the input document.

Url

PATCH https://hostname:port/dw/data/v16_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}

Formats

json, xml

Request Document

SlotConfiguration

Response Document

SlotConfiguration

Path Parameters

Parameter Type Description Constraints
configuration_id String The id of the slot configuration. maxLength=256, minLength=1
site_id String The id of the site for which you want to create the slot configuration. maxLength=32, minLength=1
slot_id String The id of the slot. maxLength=256, minLength=1

Query Parameters

Parameter Type Description Constraints
context String The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). If you do not set this query parameter, the global context is used by default.  

Header Parameters

Parameter Type Description Constraints
If-Match String The ETag header value contained in the server response.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MissingSlotConfigurationContextIdException   Thrown if the specified context id for given context 'category' or 'folder' is missing.
400 InvalidContextTypeException

contextType (String)

Thrown if the specified context type is invalid.
404 SlotNotFoundException

slotId (String)

contextType (Enum {global, category, folder})

siteId (String)

Thrown if there was no slot with the given id found for the requested site.
404 SlotConfigurationNotFoundException

slotConfigurationId (String)

siteId (String)

Thrown if there was no slot configuration found for the specified configuration id.
409 SlotConfigurationAlreadyExistsException

slotConfigurationId (String)

slotId (String)

contextId (String)

Thrown if the configuration ID should be updated into one that is already assigned.

Sample

REQUEST:
PATCH /s/-/dw/data/v16_2/sites/SiteGenesis/slots/folder-main-slot/slot_configurations/2015-06-24_16%3A33%3A18?context=folder%3Dcustomer-service HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
If-Match: 860cde3040519cce439cd99e209f8a87c3ad0b7e281cupc4k35501f763b73bd5
{
    "slot_content":
    {
        "type":"content_assets",
        "content_asset_ids":[
            "404-banner",
            "404-callout",
            "404-service"
        ]
    },
    "customer_groups":[
        "Administrators",
        "Registered"
    ],
    "enabled":true, 
    "default":true, 
    "rank":2,
    "description":"slot configuration description", 
    "callout_msg":
    {
        "default":"Default message",
        "de-DE":"Deutsche Nachricht",
        "en-US":"US american message"
    }, 
    "schedule":
    {
        "start_date":"2013-03-28T23:21:00.000Z", 
        "end_date":"2022-03-28T23:21:00.000Z", 
        "recurrence":
        {
            "day_of_week":[
                "monday",
                "sunday"
            ], 
            "time_of_day":
            {
                "time_from":"00:00:00", 
                "time_to":"23:59:59"
            }
        }
    }
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
ETag: t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6
{
    "_v":"16.2",
   "_type" : "slot_configuration",
    "slot_id":"folder-main-slot",
    "uuid":"fsdoi43ofijwdf",
    "configuration_id":"2015-06-24_16:33:18",
    "slot_content":
    {
        "type":"content_assets",
        "content_asset_ids":[
            "404-banner",
            "404-callout",
            "404-service"
        ]
    }, 
    "customer_groups":[
        "Administrators",
        "Registered"
    ],
    "assigned_to_site" : true,
    "context":"folder", 
    "context_id":"customer-service", 
    "enabled":true, 
    "default":true, 
    "rank":2,
    "description":"slot configuration description", 
    "callout_msg":
    {
        "default":"some message",
        "de-DE":"Deutsche Nachricht",
        "en-US":"US american message"
    }, 
    "schedule":
    {
        "start_date":"2013-03-28T23:21:00.000Z", 
        "end_date":"2022-03-28T23:21:00.000Z", 
        "recurrence":
        {
            "day_of_week":[
                "monday",
                "sunday"
            ], 
            "time_of_day":
            {
                "time_from":"00:00:00", 
                "time_to":"23:59:00"
            }
        }
    }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
{
  "_v":"16.2",
   "_type":"fault",
  "fault":
  {
    "type":"SlotConfigurationNotFoundException",
    "message":"No slot configuration with id '2015-06-24_16:33:18' found for site 'SiteGenesis'."
  }
}

Get Slot Configuration

Action to read an existing slot configuration.

Url

GET https://hostname:port/dw/data/v16_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}

Formats

json, xml

Response Document

SlotConfiguration

Path Parameters

Parameter Type Description Constraints
configuration_id String The id of the slot configuration. maxLength=256, minLength=1
site_id String The id of the site for which you want to create the slot configuration. maxLength=32, minLength=1
slot_id String The id of the slot. maxLength=256, minLength=1

Query Parameters

Parameter Type Description Constraints
context String The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). If you do not set this query parameter, the global context is used by default.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidContextTypeException

contextType (String)

Thrown if the specified context type is invalid.
400 MissingSlotConfigurationContextIdException   Thrown if the specified context id for given context 'category' or 'folder' is missing.
404 SlotNotFoundException

slotId (String)

contextType (Enum {global, category, folder})

siteId (String)

Throw if there was no slot with the specified id found for the requested site.
404 SlotConfigurationNotFoundException

slotConfigurationId (String)

siteId (String)

Thrown if there was no slot configuration found for the specified configuration id.

Sample

REQUEST:
GET /s/-/dw/data/v16_2/sites/SiteGenesis/slots/header-banner/slot_configurations/2015-06-24_16%3A33%3A18 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
    "_v":"16.2",
   "_type" : "slot_configuration",
    "slot_id":"header-banner",
    "uuid":"fsdoi43ofijwdf",
    "configuration_id":"2015-06-24_16:33:18",
    "slot_content":
    {
        "type":"html",
        "body":
        {
            "default":"<html>HTML content</html>"
        }
    }, 
    "customer_groups":[
        "Administrators",
        "Registered"
    ],
    "assigned_to_site" : true,
    "context":"global", 
    "enabled":true, 
    "default":true, 
    "rank":2,
    "description":"slot configuration description", 
    "callout_msg":
    {
        "default":"some message"
    }, 
    "schedule":
    {
        "start_date":"2013-03-28T23:21:00.000Z", 
        "end_date":"2022-03-28T23:21:00.000Z", 
        "recurrence":
        {
            "day_of_week":[
                "monday",
                "sunday"
            ], 
            "time_of_day":
            {
                "time_from":"00:00:00", 
                "time_to":"23:59:00"
            }
        }
    }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v":"16.2",
   "_type":"fault",
  "fault":
  {
    "type":"SlotConfigurationNotFoundException",
    "message":"No slot configuration with id '2015-06-24_16:33:18' found for site 'SiteGenesis'."
  }
}

Delete Slot Configuration

Removes a configuration for slot in a given context from a site.

Url

DELETE https://hostname:port/dw/data/v16_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}

Formats

json, xml

Path Parameters

Parameter Type Description Constraints
configuration_id String The id of the slot configuration. maxLength=256, minLength=1
site_id String The id of the site for which you want to create the slot configuration. maxLength=32, minLength=1
slot_id String The id of the slot. maxLength=256, minLength=1

Query Parameters

Parameter Type Description Constraints
context String The context string, which consists of three parts: the context type (which must be folder, category or global), an equals sign (=), and the context id (either the category id or folder id). If you do not set this query parameter, the global context is used by default.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidContextTypeException

contextType (String)

Thrown if the specified context type is invalid.
404 SlotNotFoundException

slotId (String)

contextType (Enum {global, category, folder})

siteId (String)

Throw if there was no slot with the specified id found for the requested site.

Sample

REQUEST:
DELETE /s/-/dw/data/v16_2/sites/SiteGenesis/slots/404-banner/slot_configurations/2015-06-24_16%3A33%3A18?context=global HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367

# in case of success:
 
RESPONSE:
HTTP/1.1 204 No Content

# in case of failure:
 
RESPONSE:
HTTP/1.1 404 Requested resource not found
Content-Type: application/json;charset=UTF-8
{
  "_v":"16.2",
   "_type":"fault",
  "fault":
  {
    "type":"SlotNotFoundException",
    "message":"No slot with uuid '404-banner' found for site 'SiteGenesis'."
  }
}