Changes

Record a change

Records a change the team made outside OneLence (budget, offer, pricing, tracking, creative, campaign, partner, email, social post, launch, or offline activity such as a TV or radio ad, billboard, influencer campaign, press coverage or event), on one source or the whole site, so OneLence can observe the period after it. Offline activity is recorded on the whole site only. Optional ends_on, image_url, link_url and markets are stored with the change when they are sent. It changes nothing on ad platforms.

post/sites/{site}/changes

Request

  • Base URL: https://api.onelence.com/v1
  • URL: https://api.onelence.com/v1/sites/{site}/changes
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://api.onelence.com/oauth/authorize, token URL https://api.onelence.com/oauth/token, scopes: workspace:write)
    • HTTP bearer

Path parameters

sitestring required

Site domain (e.g. example.com) or site id. Defaults to the workspace's newest active site.

Query parameters

dry_runboolean

true returns a preview of the change and applies nothing.

Headers

Idempotency-Keystring

8 to 200 visible ASCII characters. Retries with the same key and request return the stored response for 24 hours.

Request body

labelstring required

What changed, in a few words, e.g. "Raised the TikTok budget".

occurred_onstring required

Local date of the change (YYYY-MM-DD).

timestring

Local time (HH:MM). Default 12:00.

timezonestring required

IANA time zone, e.g. Europe/Rome.

source_idstring

The source it was made on (from the sources list). Without it, the whole site.

family'budget_change' | 'campaign_change' | 'creative_change' | 'partner_change' | 'email_campaign' | 'social_post' | 'pricing_change' | 'offer_change' | 'tracking_change' | 'site_launch' | 'tv_radio_ad' | 'outdoor_ad' | 'influencer_campaign' | 'press_coverage' | 'event_sponsorship' | 'other'
ends_onstring

Last local date the change ran through (YYYY-MM-DD), from the start date through 730 days after it.

image_urlstring

https address of a picture, at most 2048 characters, without a username or password.

link_urlstring

https address for the change, at most 2048 characters, without a username or password.

marketsstring[]

One to 30 different two-letter country codes, such as IT or DE.

notestring

Response

With dry_run=true: what would change. Nothing is applied.

object'preview' required
capabilitystring required

Changes

No recorded changes to this operation across all 1 revision of this API.