Update a partner product
curl --request PATCH \
--url http://localhost:3000/v1/admin/partners/products/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"selling_price": 1,
"commission_rate": 0.5,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"partner_wholesale_price": 1
}
'import requests
url = "http://localhost:3000/v1/admin/partners/products/{id}"
payload = {
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"selling_price": 1,
"commission_rate": 0.5,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": True,
"partner_wholesale_price": 1
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
brand: '<string>',
description: '<string>',
selling_price: 1,
commission_rate: 0.5,
category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subcategory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_active: true,
partner_wholesale_price: 1
})
};
fetch('http://localhost:3000/v1/admin/partners/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/admin/partners/products/{id}",
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([
'name' => '<string>',
'brand' => '<string>',
'description' => '<string>',
'selling_price' => 1,
'commission_rate' => 0.5,
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subcategory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_active' => true,
'partner_wholesale_price' => 1
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/v1/admin/partners/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("http://localhost:3000/v1/admin/partners/products/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/admin/partners/products/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sellable_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"name": "<string>",
"is_active": true,
"commission_rate": 123,
"partner_pricing_model": "<string>",
"partner_wholesale_price": 123
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Admin - Partner Products
Update a partner product
Updates a partner product’s details.
PATCH
/
v1
/
admin
/
partners
/
products
/
{id}
Update a partner product
curl --request PATCH \
--url http://localhost:3000/v1/admin/partners/products/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"selling_price": 1,
"commission_rate": 0.5,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"partner_wholesale_price": 1
}
'import requests
url = "http://localhost:3000/v1/admin/partners/products/{id}"
payload = {
"name": "<string>",
"brand": "<string>",
"description": "<string>",
"selling_price": 1,
"commission_rate": 0.5,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": True,
"partner_wholesale_price": 1
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
brand: '<string>',
description: '<string>',
selling_price: 1,
commission_rate: 0.5,
category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subcategory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_active: true,
partner_wholesale_price: 1
})
};
fetch('http://localhost:3000/v1/admin/partners/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/admin/partners/products/{id}",
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([
'name' => '<string>',
'brand' => '<string>',
'description' => '<string>',
'selling_price' => 1,
'commission_rate' => 0.5,
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subcategory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_active' => true,
'partner_wholesale_price' => 1
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/v1/admin/partners/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("http://localhost:3000/v1/admin/partners/products/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/admin/partners/products/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"selling_price\": 1,\n \"commission_rate\": 0.5,\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_active\": true,\n \"partner_wholesale_price\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sellable_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"name": "<string>",
"is_active": true,
"commission_rate": 123,
"partner_pricing_model": "<string>",
"partner_wholesale_price": 123
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Path Parameters
Body
application/json
Minimum string length:
1Required range:
x > 0Required range:
0 <= x <= 1Available options:
ambient, chilled, frozen Required range:
x > 0Available options:
consignment, wholesale ⌘I