POST api/Leads/AddSubCampaign

Request Information

URI Parameters

None.

Body Parameters

SubCampaign
NameDescriptionTypeAdditional information
Sub_campaign_code

integer

None.

Campaign_code

integer

Required

Sub_campaign_name

string

Required

String length: inclusive between 0 and 50

From_date

date

Required

To_date

date

Required

Cost

decimal number

Range: inclusive between 0 and 99999999999.99

Remark

string

String length: inclusive between 0 and 200

Interface_code

string

String length: inclusive between 0 and 10

Active

string

Matching regular expression pattern: ^[yn]{1}$

String length: inclusive between 0 and 1

Campaign

Campaign

None.

Request Formats

application/json, text/json

Sample:
{
  "Sub_campaign_code": 1,
  "Campaign_code": 2,
  "Sub_campaign_name": "sample string 3",
  "From_date": "2026-04-17T15:59:02.7398493+03:00",
  "To_date": "2026-04-17T15:59:02.7398493+03:00",
  "Cost": 6.0,
  "Remark": "sample string 7",
  "Interface_code": "sample string 8",
  "Active": "sample string 9",
  "Campaign": {
    "Campaign_code": 1,
    "Campaign_name": "sample string 2",
    "From_date": "2026-04-17T15:59:02.7398493+03:00",
    "To_date": "2026-04-17T15:59:02.7398493+03:00",
    "Cost": 1.0,
    "Remark": "sample string 3",
    "Interface_code": "sample string 4",
    "Active": "sample string 5"
  }
}

application/xml, text/xml

Sample:
<SubCampaign xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CustDemog">
  <Active>sample string 9</Active>
  <Campaign>
    <Active>sample string 5</Active>
    <Campaign_code>1</Campaign_code>
    <Campaign_name>sample string 2</Campaign_name>
    <Cost>1</Cost>
    <From_date>2026-04-17T15:59:02.7398493+03:00</From_date>
    <Interface_code>sample string 4</Interface_code>
    <Remark>sample string 3</Remark>
    <To_date>2026-04-17T15:59:02.7398493+03:00</To_date>
  </Campaign>
  <Campaign_code>2</Campaign_code>
  <Cost>6</Cost>
  <From_date>2026-04-17T15:59:02.7398493+03:00</From_date>
  <Interface_code>sample string 8</Interface_code>
  <Remark>sample string 7</Remark>
  <Sub_campaign_code>1</Sub_campaign_code>
  <Sub_campaign_name>sample string 3</Sub_campaign_name>
  <To_date>2026-04-17T15:59:02.7398493+03:00</To_date>
</SubCampaign>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'SubCampaign'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.