Upsert affiliate
Create or update an affiliate profile and payout destination.
PUT
/
v1
/
affiliates
/
{affiliateId}
Upsert affiliate
curl --request PUT \
--url https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"feeBps": 5000,
"payoutAsset": "<string>",
"payoutAddress": "<string>"
}
'const options = {
method: 'PUT',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({feeBps: 5000, payoutAsset: '<string>', payoutAddress: '<string>'})
};
fetch('https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId}"
payload = {
"feeBps": 5000,
"payoutAsset": "<string>",
"payoutAddress": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"affiliate": {
"affiliateId": "<string>",
"feeBps": 5000,
"payoutChain": "arbitrum",
"payoutAsset": "<string>",
"payoutAddress": "<string>",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"disabledAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Partner API key in the form Authorization: Bearer fn_....
Headers
Minimum string length:
1Path Parameters
Minimum string length:
1Body
application/json
Required range:
1 <= x <= 9999Available options:
arbitrum, arc, avalanche, base, bitcoin, bsc, ethereum, hedera, hypercore, hyperevm, lightning, litecoin, monad, monero, optimism, plasma, polygon, robinhood, sei, solana, spark, tempo, ton, tron, xrp, zcash Minimum string length:
1Affiliate payout address; sanctioned addresses are rejected.
Minimum string length:
1Response
Affiliate upserted
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Upsert affiliate
curl --request PUT \
--url https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"feeBps": 5000,
"payoutAsset": "<string>",
"payoutAddress": "<string>"
}
'const options = {
method: 'PUT',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({feeBps: 5000, payoutAsset: '<string>', payoutAddress: '<string>'})
};
fetch('https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://orchestration.flashnet.xyz/v1/affiliates/{affiliateId}"
payload = {
"feeBps": 5000,
"payoutAsset": "<string>",
"payoutAddress": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"affiliate": {
"affiliateId": "<string>",
"feeBps": 5000,
"payoutChain": "arbitrum",
"payoutAsset": "<string>",
"payoutAddress": "<string>",
"enabled": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"disabledAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}