Store/Update Bing AdCosts

This API request stores and updates Bing ad cost data for a specific site using the HTTP method PUT. The request includes the following parameters:

Path Parameters:

SiteIdstringRequired

The ID of the site for which to add or update ad cost data

Headers:

AuthorizationstringRequired

The authorization token for accessing the API. The header value should be set to "Bearer {your-access-token}", where {your-access-token} is the access token assigned to the user.

Request Body(JSON payload):

The data containing the ad cost information to store or update. The payload should include the following parameters:

TimePeriodstringRequired

The TimePeriod for the ad capture, must be in ISO 8601 format. yyyy-MM-ddTHH:mm:ssZ

AccountIdnumberRequired

The Account Id for bing.

CampaignIdnumberRequired

The Campaign Id associated with the bing ad.

CampaignNamestringRequired

The Campaign Name associated with the bing ad.

CampaignStatusstringRequired

The Campaign Status.

ClicksnumberRequired

The Clicks associated with the bing ad.

SpendnumberRequired

The Spend associated with the bing ad.

Impressionsnumber

The Impressions associated with the bing ad.

Keywordstring

The Keyword associated with the bing ad.


The {siteId} parameter in the URL endpoint should be replaced with the appropriate ID for the site being updated, and the {your-access-token} parameter in the authorization header should be replaced with the appropriate access token.

Request
PUT
{siteId}/adcosts/bing
curl -X PUT \ 'https://rest.rulerapi.com/v1/{siteId}/adcosts/bing' \ -H 'Authorization: Bearer {your-access-token}' \ -H 'Content-Type: application/json' \ -d '{ "TimePeriod": "{TimePeriod}", "AccountId": {AccountId}, "CampaignId": {CampaignId}, "CampaignName": "{CampaignName}", "CampaignStatus": "{CampaignStatus}", "Clicks": {Clicks}, "Spend": {Spend}, "Impressions": {Impressions}, "Keyword": "{Keyword}" }'
Response
Status: 201