Update an offer
PATCH
/api/v1/offers/{id}
const url = 'https://example.com/api/v1/offers/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Nutra CPA — US","networkId":"example","url":"https://track.network.com/click?offer=123&subid={click_id}","countries":["US","CA"],"payout":12.5,"payoutCurrency":"USD","payoutModel":"fixed","capDaily":500,"capTotal":5000,"status":"active","notes":"example","groupName":"Q3 nutra batch"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/offers/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Nutra CPA — US", "networkId": "example", "url": "https://track.network.com/click?offer=123&subid={click_id}", "countries": [ "US", "CA" ], "payout": 12.5, "payoutCurrency": "USD", "payoutModel": "fixed", "capDaily": 500, "capTotal": 5000, "status": "active", "notes": "example", "groupName": "Q3 nutra batch" }'Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»id
required
string
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
object
name
string
Example
Nutra CPA — USnetworkId
Affiliate network this offer belongs to.
string
url
May contain macros, resolved the same way link target URLs are.
string
Example
https://track.network.com/click?offer=123&subid={click_id}countries
Array<string>
Example
[ "US", "CA"]payout
number
Example
12.5payoutCurrency
string
Example
USDpayoutModel
string
capDaily
number
Example
500capTotal
number
Example
5000status
string
notes
string
groupName
string
Example
Q3 nutra batchResponses
Заголовок раздела «Responses»Media typeapplication/json
object
id
required
string
workspaceId
required
string
networkId
object
name
required
string
url
required
string
countries
object
payout
required
number
payoutCurrency
required
string
payoutModel
required
string
capDaily
object
capTotal
object
status
required
string
notes
object
groupName
object
healthStatus
required
string
disabledReason
object
createdAt
required
string
updatedAt
required
string
Example
{ "payoutModel": "fixed", "status": "active", "healthStatus": "healthy"}