Update Vendor
curl --request PUT \
--url https://production-api.puppetvendors.com/v1/vendors/{vendorId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"vendorName": "<string>",
"commissionType": "<string>",
"commissionAmount": 123
}
'import requests
url = "https://production-api.puppetvendors.com/v1/vendors/{vendorId}"
payload = {
"vendorName": "<string>",
"commissionType": "<string>",
"commissionAmount": 123
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({vendorName: '<string>', commissionType: '<string>', commissionAmount: 123})
};
fetch('https://production-api.puppetvendors.com/v1/vendors/{vendorId}', 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://production-api.puppetvendors.com/v1/vendors/{vendorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'vendorName' => '<string>',
'commissionType' => '<string>',
'commissionAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://production-api.puppetvendors.com/v1/vendors/{vendorId}"
payload := strings.NewReader("{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://production-api.puppetvendors.com/v1/vendors/{vendorId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/v1/vendors/{vendorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}"
response = http.request(request)
puts response.read_bodyVendors
Update Vendor
Modify a vendor’s name or commission settings
PUT
/
v1
/
vendors
/
{vendorId}
Update Vendor
curl --request PUT \
--url https://production-api.puppetvendors.com/v1/vendors/{vendorId} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"vendorName": "<string>",
"commissionType": "<string>",
"commissionAmount": 123
}
'import requests
url = "https://production-api.puppetvendors.com/v1/vendors/{vendorId}"
payload = {
"vendorName": "<string>",
"commissionType": "<string>",
"commissionAmount": 123
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({vendorName: '<string>', commissionType: '<string>', commissionAmount: 123})
};
fetch('https://production-api.puppetvendors.com/v1/vendors/{vendorId}', 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://production-api.puppetvendors.com/v1/vendors/{vendorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'vendorName' => '<string>',
'commissionType' => '<string>',
'commissionAmount' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://production-api.puppetvendors.com/v1/vendors/{vendorId}"
payload := strings.NewReader("{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://production-api.puppetvendors.com/v1/vendors/{vendorId}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/v1/vendors/{vendorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vendorName\": \"<string>\",\n \"commissionType\": \"<string>\",\n \"commissionAmount\": 123\n}"
response = http.request(request)
puts response.read_bodyOverview
Update a vendor’s name, commission type, or commission amount. Only the fields you include in the request body will be changed.Use Cases
- Adjust commission rates for seasonal promotions or renegotiated terms
- Rename a vendor after a rebrand
- Sync vendor settings from an external system
Path Parameters
Request Body
All fields are optional. Only provided fields will be updated.Response
200
{
"message": "Vendor updated successfully.",
"vendor": { ... }
}
Example
curl -X PUT "https://api.puppetvendors.com/v1/vendors/6157faecbebcf01bf49097d9" \
-H "Content-Type: application/json" \
-H "x-access-token: YOUR_JWT_TOKEN" \
-d '{
"commissionAmount": 12
}'
Was this page helpful?