CreateAsset

 

CampaignService / CreateAsset

 

Description: Create Asset

URL: http://{your-server-url}/api/v1/appspace/campaigns/assets

Method: POST

Token Required: True


Request Headers:
content-type: application/json or content-type: application/xml
token: {token}
Request:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Campaign.CampaignRequest

Parameter Type Nullable
Request.Schedule Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Schedule.Schedule False
Request.Asset Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Campaign.Asset.Asset False
Request.Schedule.Name string False

Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Campaign.CampaignResponse

Parameter Type
Response.Schedule Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Schedule.Schedule
Response.Asset Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Campaign.Asset.Asset

Enums:
Field Name Values
DurationType Nexus.AppSpace.Service.Contract.Model.Enums.Campaign.DurationType
AssetType Nexus.AppSpace.Service.Contract.Model.Enums.Campaign.AssetType

The following is an example request Xml body:
<CampaignRequest xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Campaign" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Schedule xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Schedule">
    <a:Description>String</a:Description>
    <a:End>2014-04-24T17:53:43.3723373Z</a:End>
    <a:Id>123</a:Id>
    <a:Name>String</a:Name>
    <a:Recurrences>
      <a:Recurrence>
        <a:Days>Everyday</a:Days>
        <a:EndTime>2014-04-24T17:53:43.3723373Z</a:EndTime>
        <a:Id>123</a:Id>
        <a:Interval>PT0S</a:Interval>
        <a:Inverse>true</a:Inverse>
        <a:ScheduleId>123</a:ScheduleId>
        <a:StartTime>2014-04-24T17:53:43.3723373Z</a:StartTime>
      </a:Recurrence>
    </a:Recurrences>
    <a:Start>2014-04-24T17:53:43.3723373Z</a:Start>
  </Schedule>
</CampaignRequest>

The following is an example request Json body:
{
	"Schedule":{
		"Description":"String",
		"End":"\/Date(1398362023372)\/",
		"Id":123,
		"Name":"String",
		"Recurrences":[
			{
				"Days":254,
				"EndTime":"\/Date(1398362023372)\/",
				"Id":123,
				"Interval":"PT0S",
				"Inverse":true,
				"ScheduleId":123,
				"StartTime":"\/Date(1398362023372)\/"
			}
		],
		"Start":"\/Date(1398362023372)\/"
	}
}

The following is an example response Xml body:
<CampaignResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Campaign" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DebugMessage xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">String</DebugMessage>
  <Errors xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">
    <Error>
      <Code>String</Code>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
    </Error>
  </Errors>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">Success</Status>
  <Schedule xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Schedule">
    <a:Description>String</a:Description>
    <a:End>2014-04-24T17:53:43.3723373Z</a:End>
    <a:Id>123</a:Id>
    <a:Name>String</a:Name>
    <a:Recurrences>
      <a:Recurrence>
        <a:Days>Everyday</a:Days>
        <a:EndTime>2014-04-24T17:53:43.3733383Z</a:EndTime>
        <a:Id>123</a:Id>
        <a:Interval>PT0S</a:Interval>
        <a:Inverse>true</a:Inverse>
        <a:ScheduleId>123</a:ScheduleId>
        <a:StartTime>2014-04-24T17:53:43.3733383Z</a:StartTime>
      </a:Recurrence>
    </a:Recurrences>
    <a:Start>2014-04-24T17:53:43.3733383Z</a:Start>
  </Schedule>
</CampaignResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"Schedule":{
		"Description":"String",
		"End":"\/Date(1398362023372)\/",
		"Id":123,
		"Name":"String",
		"Recurrences":[
			{
				"Days":254,
				"EndTime":"\/Date(1398362023373)\/",
				"Id":123,
				"Interval":"PT0S",
				"Inverse":true,
				"ScheduleId":123,
				"StartTime":"\/Date(1398362023373)\/"
			}
		],
		"Start":"\/Date(1398362023373)\/"
	}
}