Program
Update program
Update program name, website, settings, and portal configuration via API.
PUT
/
v1
/
program
Update program
curl --request PUT \
--url https://api.example.com/v1/programimport requests
url = "https://api.example.com/v1/program"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/program",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/program"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/program")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/program")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"status": 1,
"message": "Program updated successfully"
}
{
"status": 0,
"errors": {
"program_settings.currency": [
"The selected program_settings.currency is invalid."
]
}
}
Endpoint
PUT https://api.partnero.com/v1/program
Request body
Common fields| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Program name (max 255 characters) |
website | string | No | Program landing page URL (max 250 characters) |
program_settings)
| Parameter | Type | Description |
|---|---|---|
currency | string | 3-letter currency code (e.g., USD, EUR) |
cookie_lifetime | integer | Referral cookie duration in days (1–9,999,999) |
welcome_email_enabled | boolean | Send welcome email to new partners |
onboarding_enabled | boolean | Enable partner onboarding flow |
partner_email_notifications_enabled | boolean | Enable email notifications for partners |
portal_settings)
| Parameter | Type | Description |
|---|---|---|
program_page_enabled | boolean | Enable the public program page |
leads_page_enabled | boolean | Enable the lead submission page |
registration_disabled | boolean | Disable portal registration |
google_login_enabled | boolean | Enable Google login/signup |
passwordless_login_enabled | boolean | Enable passwordless (OTP) login |
sub_accounts_enabled | boolean | Enable partner sub-accounts |
widget_enabled | boolean | Enable the portal widget |
signup_popup_enabled | boolean | Enable signup pop-up form |
embeddable_form_enabled | boolean | Enable embeddable signup form |
program_settings)
| Parameter | Type | Description |
|---|---|---|
referral_portal_enabled | boolean | Enable the referral portal |
rewards_notification_enabled | boolean | Send reward notification emails |
portal_settings)
| Parameter | Type | Description |
|---|---|---|
registration_disabled | boolean | Disable portal registration |
program_page_enabled | boolean | Enable the program page |
widget_enabled | boolean | Enable the portal widget |
embeddable_form_enabled | boolean | Enable the embeddable refer-a-friend form |
popup_form_enabled | boolean | Enable the pop-up refer-a-friend form |
Request examples
curl --location --request PUT 'https://api.partnero.com/v1/program' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Updated Program",
"website": "https://yourcompany.com",
"program_settings": {
"currency": "USD",
"cookie_lifetime": 30,
"welcome_email_enabled": true
},
"portal_settings": {
"program_page_enabled": true,
"google_login_enabled": true
}
}'
curl --location --request PUT 'https://api.partnero.com/v1/program' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Referral Program",
"program_settings": {
"referral_portal_enabled": true,
"rewards_notification_enabled": true
},
"portal_settings": {
"embeddable_form_enabled": true,
"popup_form_enabled": false
}
}'
Response
{
"status": 1,
"message": "Program updated successfully"
}
{
"status": 0,
"errors": {
"program_settings.currency": [
"The selected program_settings.currency is invalid."
]
}
}
Only include the fields you want to update. All fields are optional—omitted fields remain unchanged.
⌘I
Update program
curl --request PUT \
--url https://api.example.com/v1/programimport requests
url = "https://api.example.com/v1/program"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/program",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/program"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/program")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/program")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"status": 1,
"message": "Program updated successfully"
}
{
"status": 0,
"errors": {
"program_settings.currency": [
"The selected program_settings.currency is invalid."
]
}
}
