Resellers
Update the reseller program
Partial update of the wholesale program settings. enrollment_mode: "OPEN" requires a default_tier_id.
PATCH
/
dev
/
v1
/
reseller-program
Update the reseller program
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/reseller-program \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"enrollment_mode": "MANUAL",
"application_message": "<string>",
"require_application_note": true,
"default_tier_id": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
enrollment_mode: 'MANUAL',
application_message: '<string>',
require_application_note: true,
default_tier_id: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/reseller-program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/reseller-program"
payload = {
"enabled": True,
"enrollment_mode": "MANUAL",
"application_message": "<string>",
"require_application_note": True,
"default_tier_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/reseller-program",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'enrollment_mode' => 'MANUAL',
'application_message' => '<string>',
'require_application_note' => true,
'default_tier_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/reseller-program"
payload := strings.NewReader("{\n \"enabled\": true,\n \"enrollment_mode\": \"MANUAL\",\n \"application_message\": \"<string>\",\n \"require_application_note\": true,\n \"default_tier_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}Authorizations
Use your Shoppex API key in the Authorization header.
Body
application/jsonmultipart/form-datatext/plain
Response
200 - application/json
Successful response
Previous
List reseller tiersRead-only list of wholesale tiers, ordered by `sort_order`. Tier authoring is dashboard-only.
Next
⌘I
Update the reseller program
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/reseller-program \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"enrollment_mode": "MANUAL",
"application_message": "<string>",
"require_application_note": true,
"default_tier_id": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
enrollment_mode: 'MANUAL',
application_message: '<string>',
require_application_note: true,
default_tier_id: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/reseller-program', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/reseller-program"
payload = {
"enabled": True,
"enrollment_mode": "MANUAL",
"application_message": "<string>",
"require_application_note": True,
"default_tier_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/reseller-program",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'enrollment_mode' => 'MANUAL',
'application_message' => '<string>',
'require_application_note' => true,
'default_tier_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/reseller-program"
payload := strings.NewReader("{\n \"enabled\": true,\n \"enrollment_mode\": \"MANUAL\",\n \"application_message\": \"<string>\",\n \"require_application_note\": true,\n \"default_tier_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}