Make an offer on a network: a URL with {click_id}, a payout and a daily cap
POST
/v1/buyer/offers
const url = 'https://example.com/v1/buyer/offers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"country":"example","daily_cap":1,"direct":true,"expected_sequence":1,"fallback_offer_id":1,"name":"example","network_id":1,"payout":{"amount_micros":1,"currency":"example"},"payout_mode":"postback","status":"active","tags":["example"],"url":"example","validate_only":true}'};
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/offers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "country": "example", "daily_cap": 1, "direct": true, "expected_sequence": 1, "fallback_offer_id": 1, "name": "example", "network_id": 1, "payout": { "amount_micros": 1, "currency": "example" }, "payout_mode": "postback", "status": "active", "tags": [ "example" ], "url": "example", "validate_only": true }'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
country
string | null
daily_cap
integer | null format: int64
direct
boolean | null
expected_sequence
integer | null format: int64
fallback_offer_id
integer | null format: int64
name
string | null
network_id
integer | null format: int64
payout_mode
string | null
status
string | null
tags
Array<string> | null
url
string | null
validate_only
boolean
Responses
Section titled “Responses”Created
Media typeapplication/json
object
country
required
string
created_at
required
string format: date-time
daily_cap
required
integer format: int64
direct
required
boolean
id
required
integer format: int64
import_key
required
string
name
required
string
network
required
object
id
required
integer format: int64
name
string
origin
required
string
payout
required
payout_mode
required
string | null
sequence
required
integer format: int64
status
required
string | null
tags
required
Array<string>
updated_at
required
string format: date-time
url
required
string
workspace_id
required
integer format: int64
Example
{ "payout_mode": "postback", "status": "active"}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" }}