Campaigns Resource (Data API 17.1)
Summary
Get Campaign
Action to get campaign information.Url
GET https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The id of the requested campaign. | minLength=1, nullable=false |
site_id | String | The site the requested campaign belongs to. | minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Thrown in case the campaign does not exist matching the given id |
Sample
REQUEST:
GET /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign 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-Aug-2014 00:00:00 GMT
{
"_v" : "17.1",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "campaign",
"description" : "My Campaign",
"enabled" : true,
"coupons" : ["testCoupon"],
"customer_groups" : ["Registered"],
"source_code_groups" : ["WapiSourceCodeGroup1"],
"start_date" : "2015-04-01T11:30:15.000Z",
"end_date" : "2015-07-31T23:09:08.000Z"
"link" : "https://example.com/s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign",
}
# in case of failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
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":"17.1",
"_type":"fault",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' for site 'SiteGenesis' found."
}
}
Update Campaign
Updates the campaign with the specified information.Url
PATCH https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The id of the requested campaign. | minLength=1 |
site_id | String | The site context. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Thrown in case the campaign does not exist matching the given id |
Sample
REQUEST:
PATCH /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
"_resource_state" : "847f9c3c5867f641470b3046aeec31f07757991b792d722e10079926f7a289fb",
"description" : "My Other Campaign",
"enabled" : false
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
"_v" : "17.1",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "campaign",
"description" : "My Other Campaign",
"enabled" : false,
"coupons" : ["testCoupon"],
"customer_groups" : ["Registered"],
"source_code_groups" : ["WapiSourceCodeGroup1"],
"start_date" : "2015-04-01T11:30:15.000Z",
"end_date" : "2015-07-31T23:09:08.000Z"
"link" : "https://example.com/s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign",
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"_type":"fault",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' found."
}
}
Delete Campaign
Deletes the campaign by IDUrl
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | A campaign id to remove | |
site_id | String | The site context. | minLength=1 |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/site-one/campaigns/my-campaign 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
Create Campaign
Creates a campaign using the information provided.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The id of the campaign to create. | minLength=1, nullable=false |
site_id | String | The site context. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
IdConflictException
|
bodyID (String) urlID (String) |
if the Id in request is not the same as the ID in document. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
"description" : "My Campaign",
"enabled" : true,
"coupons" : ["testCoupon"],
"customer_groups" : ["Registered"],
"source_code_groups" : ["WapiSourceCodeGroup1"],
"start_date" : "2015-04-01T11:30:15.000Z",
"end_date" : "2015-07-31T23:09:08.000Z"
}
# in case of success:
RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Location: https://example.com/s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered
Content-Type: application/json; charset=UTF-8
{
"_v" : "17.1",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "campaign",
"description" : "My Campaign",
"enabled" : true,
"coupons" : ["testCoupon"],
"customer_groups" : ["Registered"],
"source_code_groups" : ["WapiSourceCodeGroup1"],
"start_date" : "2015-04-01T11:30:15.000Z",
"end_date" : "2015-07-31T23:09:08.000Z"
"link" : "https://example.com/s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered",
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"_type":"fault",
"fault":{
"type":"CampaignDuplicateException",
"message":"Campaign with id 'campaign-registered' is already in use."
}
}
Bind Coupon
Action to bind a single coupon to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/coupons/{coupon_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that coupons are to be bound to | minLength=1 |
coupon_id | String | The coupon ID to bind to a campaign | minLength=1, nullable=false |
site_id | String | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/coupons/couponOne HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
Content-Length: 0
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# 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" : "17.1",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type":"fault",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}
Unbind Coupon
Action to unbind a coupon from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/coupons/{coupon_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that coupons are to be unbound from | minLength=1 |
coupon_id | String | The coupon ID to unbind from a campaign | minLength=1, nullable=false |
site_id | String | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/site-one/campaigns/campaign-registered/coupons/couponOne HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
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 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" : "17.1",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}
Bind Customer Group
Action to bind a single customer group to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/customer_groups/{customer_group_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that coupons are to be bound to | minLength=1 |
customer_group_id | String | The customer group ID to bind to a campaign | minLength=1, nullable=false |
site_id | String | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/customer_groups/TA-CustomerGroup-001 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
Content-Length: 0
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# 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" : "17.1",
"_type":"fault",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}
Unbind Customer Group
Action to unbind a customer group from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/customer_groups/{customer_group_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that coupons are to be unbound from | minLength=1 |
customer_group_id | String | The customer group ID to unbind from a campaign | minLength=1, nullable=false |
site_id | String | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/customer_groups/WAPI-TA-CustomerGroup-001 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
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 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" : "17.1",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}
Bind Promotion
Action to bind a single promotion to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/promotions/{promotion_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The ID of the campaign to which the promotion is to be assigned. | minLength=1 |
promotion_id | String | The ID of the promotion that is to be assigned to the campaign. | minLength=1 |
site_id | String | The ID of the site that contains the campaign and promotion. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
PromotionNotFoundException
|
promotionId (String) siteId (String) |
Indicates that the promotion with the given promotion ID is not found. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign/promotions/my-promotion
HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' for site 'SiteGenesis' found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"PromotionNotFoundException",
"message":"No promotion with id 'my-promotion' for site 'SiteGenesis' found."
}
}
Unbind Promotion
Action to unbind a single promotion from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/promotions/{promotion_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The ID of the campaign to which the promotion is to be assigned. | minLength=1 |
promotion_id | String | The ID of the promotion that is to be assigned to the campaign. | minLength=1 |
site_id | String | The ID of the site that contains the campaign and promotion. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
PromotionNotFoundException
|
promotionId (String) siteId (String) |
Indicates that the campaign with the given promotion ID is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign/promotions/my-promotion
HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' for site 'SiteGenesis' found."
}
}
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"PromotionNotFoundException",
"message":"No promotion with id 'my-promotion' for site 'SiteGenesis' found."
}
}
Bind SlotConfiguration
Action to bind a slot configuration to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/slot_configurations/{slot_id}/{slot_config_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The id of the campaign | minLength=1 |
site_id | String | The id of the site | minLength=1 |
slot_config_id | String | The id of the slot configuration | minLength=1 |
slot_id | String | The of the slot | 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. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidContextTypeException
|
contextType (String) |
Indicates the slot context type is not one of "global", "category", or "folder" |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
SlotWithContextTypeNotFoundException
|
slotId (String) contextType (String) siteId (String) |
Indicates that the slot with the given slot ID and context type is not found. |
404 |
SlotConfigurationIdentifierNotFoundException
|
siteId (String) slotId (String) slotConfigurationId (String) contextType (Enum {global, category, folder}) contextId (String) |
Indicates that the slot with the given slot ID, slot configuration ID and context type is not found. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/slot_configurations/my-slot1/my-slot-config2?context=category=my-category1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Length: 0
# in case of success:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'campaign-registered' for site 'SiteGenesis' found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SlotWithContextTypeNotFoundException",
"message":"No slot with id 'my-slot' and context type 'CATEGORY' for site 'SiteGenesis' found."
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SlotConfigurationIdentifierNotFoundException",
"message":"No slot configuration with id 'my-slot-config2', slot id 'my-slot', context type 'CATEGORY', and context id '' for site 'SiteGenesis' found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"InvalidContextTypeException",
"message":"'invalid' is not a valid context."
}
}
Unbind SlotConfiguration
Action to unbind a slot configuration from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/slot_configurations/{slot_id}/{slot_config_id}?context={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The id of the campaign | minLength=1 |
site_id | String | The id of the site | minLength=1 |
slot_config_id | String | The id of the slot configuration | minLength=1 |
slot_id | String | The of the slot | 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). | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidContextTypeException
|
contextType (String) |
Indicates the slot context type is not one of "global", "category", or "folder" |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
SlotWithContextTypeNotFoundException
|
slotId (String) contextType (String) siteId (String) |
Indicates that the slot with the given slot ID and context type is not found. |
404 |
SlotConfigurationIdentifierNotFoundException
|
siteId (String) slotId (String) slotConfigurationId (String) contextType (Enum {global, category, folder}) contextId (String) |
Indicates that the slot with the given slot ID, slot configuration ID and context type is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/slot_configurations/my-slot1/my-slot-config2?context=category=my-category1 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
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'campaign-registered' for site 'SiteGenesis' found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SlotWithContextTypeNotFoundException",
"message":"No slot with id 'my-slot' and context type 'CATEGORY' for site 'SiteGenesis' found."
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SlotConfigurationIdentifierNotFoundException",
"message":"No slot configuration with id 'my-slot-config2', slot id 'my-slot', context type 'CATEGORY', and context id '' for site 'SiteGenesis' found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"InvalidContextTypeException",
"message":"'invalid' is not a valid context."
}
}
Bind SortingRule
Action to bind a single sorting rule to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/sorting_rules/{sorting_rule_id}/{category_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The ID of the campaign to which the sorting rule is to be assigned. | minLength=1 |
category_id | String | The ID of the category that is associated with the sorting rule. | minLength=1 |
site_id | String | The ID of the site that contains the campaign, sorting rule and category. | minLength=1 |
sorting_rule_id | String | The ID of sorting rule that is to be assigned to the campaign. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidCategoryException
|
categoryId (String) |
Indicates that the category with the given category ID is not found. |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
SortingRuleNotFoundException
|
sortingRuleId (String) siteId (String) |
Indicates that the sorting rule with the given sorting rule ID is not found. |
409 |
SortingRuleCampaignAssignConflictException
|
sortingRuleId (String) campaignId (String) categoryId (String) existingSortingRuleId (String) |
Indicates that there is a sorting rule already assigned to the given campaign ID and category ID. The sorting rule with the given sorting rule ID cannot be assigned to the same campaign ID and category ID. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/my-campaign/sorting_rules/my-sorting-rule/my-category HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' for site 'SiteGenesis' found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SortingRuleNotFoundException",
"message":"No sorting rule with id 'my-sorting-rule' for site 'SiteGenesis' found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"InvalidCategoryException",
"message":"Invalid category with id 'my-category' specified."
}
}
HTTP/1.1 409 Conflict
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SortingRuleCampaignAssignConflictException",
"message":"Could not create sorting rule campaign assignment for sorting rule 'my-sorting-rule'. Assignment already exists with campaign 'my-campaign', and category 'my-category' for the sorting rule 'my-sorting-rule-2'.
}
}
UnBind SortingRule
Action to unbind a single sorting rule from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/sorting_rules/{sorting_rule_id}/{category_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The ID of the campaign to which the sorting rule is to be assigned. | minLength=1 |
category_id | String | The ID of the category that is associated with the sorting rule. | minLength=1 |
site_id | String | The ID of the site that contains the campaign, sorting rule and category. | minLength=1 |
sorting_rule_id | String | The ID of sorting rule that is to be assigned to the campaign. | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidCategoryException
|
categoryId (String) |
Indicates that the category with the given category ID is not found. |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign ID is not found. |
404 |
SortingRuleNotFoundException
|
sortingRuleId (String) siteId (String) |
Indicates that the sorting rule with the given sorting rule ID is not found. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/sorting_rules/my-sorting-rule/my-category HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
# in case of success:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 204 NO CONTENT
Content-Length: 0
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"CampaignNotFoundException",
"message":"No campaign with id 'my-campaign' for site 'SiteGenesis' found."
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"SortingRuleNotFoundException",
"message":"No sorting rule with id 'my-sorting-rule' for site 'SiteGenesis' found."
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.1",
"fault":{
"type":"InvalidCategoryException",
"message":"Invalid category with id 'my-category' specified."
}
}
Bind Source Code Group
Action to bind a single source code group to a given campaign.Url
PUT https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/source_code_groups/{source_code_group_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that source code group are to be bound to | minLength=1 |
site_id | String | minLength=1 | |
source_code_group_id | String | The source code group ID to bind to a campaign | minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
PUT /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/source_code_groups/scg1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
Content-Length: 0
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# 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" : "17.1",
"_type":"fault",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}
Unbind Source Code Group
Action to unbind a source code group from a given campaign.Url
DELETE https://hostname:port/dw/data/v17_1/sites/{site_id}/campaigns/{campaign_id}/source_code_groups/{source_code_group_id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
campaign_id | String | The campaign ID that source code groups are to be unbound from | minLength=1 |
site_id | String | minLength=1 | |
source_code_group_id | String | The source code group ID to unbind from a campaign | minLength=1, nullable=false |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
ConstraintViolationException
|
mp (MethodParameter) o (Object) reason (String) |
Indicates some parameter constraint violation occurs |
404 |
CampaignNotFoundException
|
campaignId (String) siteId (String) |
Indicates that the campaign with the given campaign id is unknown. |
Sample
REQUEST:
DELETE /s/-/dw/data/v17_1/sites/SiteGenesis/campaigns/campaign-registered/source_code_groups/scg1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
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 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" : "17.1",
"fault" : {
"type" : "CampaignNotFoundException",
"message" : "No campaign with id 'campaign-registered' in site 'SiteGenesis' found."
}
}