SlotConfigurations resource (Data API 23.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. Note that this operation will not touch any relational properties, which means, that e.g. the rank on a specific campaign assignment will not be changed, when the rank for the slot configuration itself is updated. |
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/v23_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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. |
404 | ContentNotFoundException |
libraryId (String) contentId (String) |
Thrown if content asset does not exist in the library of the current domain but is assigned during creation of the configuration. |
Sample
REQUEST:
PUT /s/-/dw/data/v23_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/v23_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
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_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" : "23.2",
"_type":"fault",
"fault":
{
"type":"SlotConfigurationNotFoundException",
"message":"No slot configuration with ID '2015-06-24_16:33:18' for site 'SiteGenesis' was found."
}
}
# in case of trying to assign content asset '404-banner' that is not existing in database
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
{
"_v" : "23.2",
"fault":
{
"arguments":
{
"contentId": "404-banner",
"libraryId": "Library"
},
"type":"ContentNotFoundException",
"message":"No content asset with ID '404-banner' in library 'Library' was found."
}
}
Update slot configuration
Updates an existing slot configuration. This action ignores the slot_id and the context information in the input document. Note that this operation will not touch any relational properties, which means, that e.g. the rank on a specific campaign assignment will not be changed, when the rank for the slot configuration itself is updated.Url
PATCH https://hostname:port/dw/data/v23_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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 | 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. |
404 | ContentNotFoundException |
libraryId (String) contentId (String) |
Thrown if content asset does not exist in the library of the current domain but is assigned during update. |
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/v23_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
{
"_resource_state" : "847f9c3c5867f641470b3046aeec31f07757991b792d722e10079926f7a289fb",
"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
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_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" : "23.2",
"_type":"fault",
"fault":
{
"type":"SlotConfigurationNotFoundException",
"message":"No slot configuration with ID '2015-06-24_16:33:18' for site 'SiteGenesis' was found."
}
}
# in case of trying to assign content asset '404-banner' that is not existing in database
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
{
"_v" : "23.2",
"fault":
{
"arguments":
{
"contentId": "404-banner",
"libraryId": "Library"
},
"type":"ContentNotFoundException",
"message":"No content asset with ID '404-banner' in library 'Library' was found."
}
}
Get slot configuration
Action to read an existing slot configuration.Url
GET https://hostname:port/dw/data/v23_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
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/v23_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
{
"_v" : "23.2",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_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" : "23.2",
"_type":"fault",
"fault":
{
"type":"SlotConfigurationNotFoundException",
"message":"No slot configuration with ID '2015-06-24_16:33:18' for site 'SiteGenesis' was found ."
}
}
Delete slot configuration
Removes a configuration for slot in a given context from a site.Url
DELETE https://hostname:port/dw/data/v23_2/sites/{site_id}/slots/{slot_id}/slot_configurations/{configuration_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
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/v23_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
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
# 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" : "23.2",
"_type":"fault",
"fault":
{
"type":"SlotNotFoundException",
"message":"No slot with uuid '404-banner' for site 'SiteGenesis' was found."
}
}