CreateSite

 

CampaignService / CreateSite

 

Description: Create Site

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

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.Site Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Campaign.Site False

Response:

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

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

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">
  <Site xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Campaign">
    <a:Code>String</a:Code>
    <a:CreatedAt>2014-04-24T17:53:43.3513106Z</a:CreatedAt>
    <a:CreatedBy>String</a:CreatedBy>
    <a:DeletedAt>2014-04-24T17:53:43.3513106Z</a:DeletedAt>
    <a:DeletedBy>String</a:DeletedBy>
    <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
    <a:LastUpdatedBy i:nil="true" />
    <a:TypeId>123</a:TypeId>
    <a:Description>String</a:Description>
    <a:IsTemplate>true</a:IsTemplate>
    <a:Metadata xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
      <b:KeyValuePair>
        <b:Key>String</b:Key>
        <b:Value>String</b:Value>
      </b:KeyValuePair>
    </a:Metadata>
    <a:Name>String</a:Name>
    <a:OwnerId>123</a:OwnerId>
    <a:ParentId>123</a:ParentId>
  </Site>
</CampaignRequest>

The following is an example request Json body:
{
	"Site":{
		"Code":"String",
		"CreatedAt":"\/Date(1398362023351)\/",
		"CreatedBy":"String",
		"DeletedAt":"\/Date(1398362023351)\/",
		"DeletedBy":"String",
		"Guid":"11111111-1111-1111-1111-111111111111",
		"LastUpdatedBy":null,
		"TypeId":123,
		"Description":"String",
		"IsTemplate":true,
		"Metadata":[
			{
				"Key":"String",
				"Value":"String"
			}
		],
		"Name":"String",
		"OwnerId":123,
		"ParentId":123
	}
}

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>
  <Site xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.Campaign">
    <a:Code>String</a:Code>
    <a:CreatedAt>2014-04-24T17:53:43.3513106Z</a:CreatedAt>
    <a:CreatedBy>String</a:CreatedBy>
    <a:DeletedAt>2014-04-24T17:53:43.3513106Z</a:DeletedAt>
    <a:DeletedBy>String</a:DeletedBy>
    <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
    <a:Id>123</a:Id>
    <a:LastUpdatedAt>2014-04-24T17:53:43.3513106Z</a:LastUpdatedAt>
    <a:LastUpdatedBy>String</a:LastUpdatedBy>
    <a:TypeId>123</a:TypeId>
    <a:Description>String</a:Description>
    <a:IsTemplate>true</a:IsTemplate>
    <a:Metadata xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
      <b:KeyValuePair>
        <b:Key>String</b:Key>
        <b:Value>String</b:Value>
      </b:KeyValuePair>
    </a:Metadata>
    <a:Name>String</a:Name>
    <a:OwnerId>123</a:OwnerId>
    <a:ParentId>123</a:ParentId>
    <a:Sites>
      <a:Site>
        <a:Code>String</a:Code>
        <a:CreatedAt>2014-04-24T17:53:43.3513106Z</a:CreatedAt>
        <a:CreatedBy>String</a:CreatedBy>
        <a:DeletedAt>2014-04-24T17:53:43.3513106Z</a:DeletedAt>
        <a:DeletedBy>String</a:DeletedBy>
        <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
        <a:Id>123</a:Id>
        <a:LastUpdatedAt>2014-04-24T17:53:43.3513106Z</a:LastUpdatedAt>
        <a:LastUpdatedBy>String</a:LastUpdatedBy>
        <a:TypeId>123</a:TypeId>
        <a:Description>String</a:Description>
        <a:IsTemplate>true</a:IsTemplate>
        <a:Metadata xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
          <b:KeyValuePair>
            <b:Key>String</b:Key>
            <b:Value>String</b:Value>
          </b:KeyValuePair>
        </a:Metadata>
        <a:Name>String</a:Name>
        <a:OwnerId>123</a:OwnerId>
        <a:ParentId>123</a:ParentId>
      </a:Site>
    </a:Sites>
  </Site>
</CampaignResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"Site":{
		"Code":"String",
		"CreatedAt":"\/Date(1398362023351)\/",
		"CreatedBy":"String",
		"DeletedAt":"\/Date(1398362023351)\/",
		"DeletedBy":"String",
		"Guid":"11111111-1111-1111-1111-111111111111",
		"Id":123,
		"LastUpdatedAt":"\/Date(1398362023351)\/",
		"LastUpdatedBy":"String",
		"TypeId":123,
		"Description":"String",
		"IsTemplate":true,
		"Metadata":[
			{
				"Key":"String",
				"Value":"String"
			}
		],
		"Name":"String",
		"OwnerId":123,
		"ParentId":123,
		"Sites":[
			{
				"Code":"String",
				"CreatedAt":"\/Date(1398362023351)\/",
				"CreatedBy":"String",
				"DeletedAt":"\/Date(1398362023351)\/",
				"DeletedBy":"String",
				"Guid":"11111111-1111-1111-1111-111111111111",
				"Id":123,
				"LastUpdatedAt":"\/Date(1398362023351)\/",
				"LastUpdatedBy":"String",
				"TypeId":123,
				"Description":"String",
				"IsTemplate":true,
				"Metadata":[
					{
						"Key":"String",
						"Value":"String"
					}
				],
				"Name":"String",
				"OwnerId":123,
				"ParentId":123
			}
		]
	}
}