PUT api/subscription/downgrade/campaign/search
Downgrades a given search campaign's subscription to a lower spend amount. Downgrade occurs at end of current billing cycle. The update will fail if the currency does not match the currency on file. Currency is only passed as a verification method.
Note: The ednpoint
api/subscription/campaign/downgradehas been depricated and replced by
api/subscription/downgrade/campaign/search
Request Information
Authentication Method
Partner/Account AuthenticationURI Parameters
None.
Body Parameters
Search Campaign Subscription (Upgrade/Downgrade)Name | Description | Type | Additional information |
---|---|---|---|
refundedSpend |
Amount of spend being reclaimed. Only valid for upgrades and downgrades. The difference between this amount and the availabel spend must be within 2 days spend or less than the chargedSpend amount whichever is greater. |
decimal number |
Range: inclusive between 0 and 999999999 |
refundedFee |
The amount fo fee refunded if any. It should be proportional to the refunded spend. |
decimal number |
Range: inclusive between 0 and 999999999 |
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
{ "refundedSpend": 0.0, "refundedFee": 0.0, "chargedSpend": 0.0, "chargedFee": 0.0, "nextCharge": "2017-04-14T09:57:14", "budget": 1500.0, "campaignId": 111, "currency": "USD", "partnerSKUs": null }
application/xml, text/xml
<SearchCampaignSubscription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.UpdateModels"> <budget xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">1500</budget> <campaignId xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">111</campaignId> <currency xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">USD</currency> <partnerSKUs i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels" /> <chargedFee xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">0</chargedFee> <chargedSpend xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">0</chargedSpend> <nextCharge xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.DTOBaseModels">2017-04-14T09:57:14</nextCharge> <refundedFee>0</refundedFee> <refundedSpend>0</refundedSpend> </SearchCampaignSubscription>
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>