POST api/subscription/campaign/display
Creates a new display subscription, with all related billing data, in SiteWit and returns all necessary data for linking in the Partner's internal systems. The currency parameter should match the currency on file for the account. If no subscriptions have been purchased yet the currency can be different and will set the account currency.
Note: Use at your own risk. This endpoint will allow the subscription to be created, upgraded, downgraded, and reinstated without any warning as to the ultimate action and there fore can be dangerous. It is therefore better to use the explicit endpoints for create, upgrade, downgrade or reinstate.
Request Information
Authentication Method
Partner/Account AuthenticationURI Parameters
None.
Body Parameters
Display Campaign Subscription (Create)Name | Description | Type | Additional information |
---|---|---|---|
billingType |
Type of billing |
BillingType |
|
chargedSpend |
Amount of money whith which the campaign is being funded today. This amount in conjuction with the budget will determine how long the campaign can run assuming the normal budget amount is spread evenly over 30 days. For example a campaign with a budget of 100 and initialFunds of 300 should run for 90 days before neededing to be replenished. |
decimal number |
Range: inclusive between 0 and 999999999 |
chargedFee |
If the fee is to be prorated then specify the prorated amount here. It should be proportional to the spend. If not passed then the fee will be calculated based on on the ratio of initial spend to the budget amount. |
decimal number |
Range: inclusive between 0 and 999999999 |
nextCharge |
Date when the campaign is expected to be charged next. For subscriptions with a type of Automatic this will be the date the spend is refilled and the partner is invoiced. For subscriptions with a type of Triggered this will represent the date when the spend is expected to be refilled. If not passed the date will be calculated based on the ratio of initial spend to the budget amount. Expected format is yyyy-MM-dd HH:mm:ssK. |
string |
|
budget |
Desired 30 Day spend budget |
decimal number |
Required Range: inclusive between 1 and 999999999 |
campaignId |
Id of campaign tied to this subscription |
integer |
Required |
currency |
Currency in which spend will be charged/reported |
Currency |
Required |
partnerSKUs |
A list of partner skus for auditng purposes |
Collection of PartnerSku |
|
Request Formats
application/json, text/json
{ "billingType": "Undefined", "chargedSpend": 1.0, "chargedFee": 2.0, "nextCharge": "sample string 3", "budget": 4.0, "campaignId": 5, "currency": "Undefined", "partnerSKUs": [ { "sku": "sample string 1", "type": "sample string 2" }, { "sku": "sample string 1", "type": "sample string 2" } ] }
application/xml, text/xml
<DisplayCampaignSubscription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.CreateModels"> <budget xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">4</budget> <campaignId xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">5</campaignId> <currency xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">Undefined</currency> <partnerSKUs xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels"> <PartnerSku> <sku i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models" /> <type i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models" /> <sku>sample string 1</sku> <type>sample string 2</type> </PartnerSku> <PartnerSku> <sku i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models" /> <type i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models" /> <sku>sample string 1</sku> <type>sample string 2</type> </PartnerSku> </partnerSKUs> <chargedFee xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">2</chargedFee> <chargedSpend xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">1</chargedSpend> <nextCharge xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">sample string 3</nextCharge> <billingType>Undefined</billingType> </DisplayCampaignSubscription>
Response Information
Successful Response:Resource Description
Campaign Subscription ChargeName | Description | Type | Additional information |
---|---|---|---|
charge | Campaign Charge Detail |
|
|
googleCoupon | Google Coupon |
|
|
id | integer |
|
|
name | string |
|
|
status | string |
|
|
type | string |
|
|
endDate | date |
|
|
subscription | Subscription Detail |
|
|
partnerSKUs | Collection of Partner Sku |
|
|
budgetLockExpiration | date |
|
|
subscriptionExpiration | date |
|
Response Formats
application/json, text/json
{ "charge": { "items": [ { "name": "Silver Spend", "price": 1500.0, "currency": "USD", "type": "SearchCampaignFee", "partnerSKU": null, "exchangeRate": 0.071008 }, { "name": "Silver Fee", "price": 100.0, "currency": "USD", "type": "SearchCampaignSpend", "partnerSKU": null, "exchangeRate": 0.071008 } ], "termRatio": 1.0 }, "googleCoupon": null, "id": 111, "name": "My campaign", "status": "Active", "type": "Search", "endDate": null, "subscription": { "budget": 1500.0, "currency": "USD", "active": true, "type": "SearchCampaign", "billingType": "Automatic", "nextCharge": "2025-07-30T02:49:26.5580935+00:00" }, "partnerSKUs": null, "budgetLockExpiration": null, "subscriptionExpiration": null }
application/xml, text/xml
<CampaignSubscriptionCharge xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.ReturnModels"> <budgetLockExpiration i:nil="true" /> <endDate i:nil="true" /> <id>111</id> <name>My campaign</name> <partnerSKUs i:nil="true" /> <status>Active</status> <subscription> <active>true</active> <billingType>Automatic</billingType> <budget>1500</budget> <currency>USD</currency> <nextCharge>2025-07-30T02:49:26.5580935+00:00</nextCharge> <type>SearchCampaign</type> </subscription> <subscriptionExpiration i:nil="true" /> <type>Search</type> <charge> <items> <ChargeItem> <currency>USD</currency> <exchangeRate>0.071008</exchangeRate> <name>Silver Spend</name> <partnerSKU i:nil="true" /> <price>1500</price> <type>SearchCampaignFee</type> </ChargeItem> <ChargeItem> <currency>USD</currency> <exchangeRate>0.071008</exchangeRate> <name>Silver Fee</name> <partnerSKU i:nil="true" /> <price>100</price> <type>SearchCampaignSpend</type> </ChargeItem> </items> <termRatio>1</termRatio> </charge> <googleCoupon i:nil="true" /> </CampaignSubscriptionCharge>