Set up to 100 bids or daily budgets of a connection's source objects at one level, in the account's currency, or reset each to its parent's: connectors reads each first, writes what changes, and records the change. A value you set holds against rules unless rules_may_change; one that more than doubles the value it replaces, or cuts it below half, needs confirm_large_change
POST
/v1/buyer/source-objects/values
const url = 'https://example.com/v1/buyer/source-objects/values';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirm_large_change":true,"connection_id":1,"kind":"bid","level":"campaign","note":"example","rules_may_change":true,"targets":[{"key":{"country":"example","source_campaign":"example","values":["example"]},"reset":true,"value":{"amount":{"amount_micros":1,"currency":"example"},"factor_ppm":1}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/buyer/source-objects/values \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirm_large_change": true, "connection_id": 1, "kind": "bid", "level": "campaign", "note": "example", "rules_may_change": true, "targets": [ { "key": { "country": "example", "source_campaign": "example", "values": [ "example" ] }, "reset": true, "value": { "amount": { "amount_micros": 1, "currency": "example" }, "factor_ppm": 1 } } ] }'Who: a workspace’s buyer, or its key. API keys with the buyer:write scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Made once per action and sent again on every retry of it, so the service acts once: the request_id of the create or money-moving call; a new one when left out
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
confirm_large_change
boolean
connection_id
required
integer format: int64
kind
required
string
level
required
string
note
string
rules_may_change
boolean
targets
required
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
required
Array<object>
object
attempts
required
integer format: int32
changed_by
required
connection
required
object
id
required
integer format: int64
name
string
created_at
required
string format: date-time
done_at
required
string | null format: date-time
error_code
required
string
error_message
required
string
id
required
string
key
required
object
country
required
string
source_campaign
required
string
values
required
Array<string>
kind
required
string | null
last_call_id
required
string
level
required
string | null
note
required
string
rules_may_change
required
boolean
state_after
required
string | null
state_before
required
string | null
status
required
string | null
took_over
required
string
undo_of
required
string
updated_at
required
string format: date-time
value_after
required
value_asked
required
Any of:
object
ceiling
required
floor
required
from
required
ratio_ppm
required
integer | null format: int64
reset
required
boolean
null
value_before
required
workspace_id
required
integer format: int64
Example
{ "data": [ { "changed_by": { "kind": "user" }, "kind": "pause", "level": "campaign", "state_after": "active", "state_before": "active", "status": "pending" } ]}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}