Referral
Update referral program settings
PATCH
/
v1
/
referral
/
admin
/
program
Update referral program settings
curl --request PATCH \
--url https://api.wazapin.com/v1/referral/admin/program \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
holding_days: 123,
reward_amount_idr: 123,
rules: {
milestones: [{bonus_idr: 123, threshold: 123}],
referee_discount_idr: 123,
referee_discount_percent: 123,
sale_commission_percent: 123
}
})
};
fetch('https://api.wazapin.com/v1/referral/admin/program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/referral/admin/program"
payload = {
"enabled": True,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"enabled": true,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Body
application/json
⌘I
Update referral program settings
curl --request PATCH \
--url https://api.wazapin.com/v1/referral/admin/program \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
holding_days: 123,
reward_amount_idr: 123,
rules: {
milestones: [{bonus_idr: 123, threshold: 123}],
referee_discount_idr: 123,
referee_discount_percent: 123,
sale_commission_percent: 123
}
})
};
fetch('https://api.wazapin.com/v1/referral/admin/program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/referral/admin/program"
payload = {
"enabled": True,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"enabled": true,
"holding_days": 123,
"reward_amount_idr": 123,
"rules": {
"milestones": [
{
"bonus_idr": 123,
"threshold": 123
}
],
"referee_discount_idr": 123,
"referee_discount_percent": 123,
"sale_commission_percent": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}