Update Product
curl --request PUT \
--url https://staging-api.puppetvendors.com/products/{productId} \
--header 'x-access-token: <api-key>'import requests
url = "https://staging-api.puppetvendors.com/products/{productId}"
headers = {"x-access-token": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'x-access-token': '<api-key>'}};
fetch('https://staging-api.puppetvendors.com/products/{productId}', 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://staging-api.puppetvendors.com/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://staging-api.puppetvendors.com/products/{productId}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging-api.puppetvendors.com/products/{productId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.puppetvendors.com/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyProducts
Update Product
Full product update via Shopify productSet mutation
PUT
/
products
/
{productId}
Update Product
curl --request PUT \
--url https://staging-api.puppetvendors.com/products/{productId} \
--header 'x-access-token: <api-key>'import requests
url = "https://staging-api.puppetvendors.com/products/{productId}"
headers = {"x-access-token": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'x-access-token': '<api-key>'}};
fetch('https://staging-api.puppetvendors.com/products/{productId}', 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://staging-api.puppetvendors.com/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://staging-api.puppetvendors.com/products/{productId}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging-api.puppetvendors.com/products/{productId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.puppetvendors.com/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyV2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Full update via Shopify’sproductSet mutation. Accepts a Shopify numeric ID, Shopify GID, or MongoDB ObjectId for productId. Vendor tokens can only update their own products.
variants, options, and metafields arrays replace existing values. Partial updates on these arrays are not supported — send the full desired state.Path Parameters
Product ID (Shopify numeric, GID, or MongoDB ObjectId).
Request Body
Full product replacement payload. See theProductUpdateRequest schema in the OpenAPI spec for the full field list (title, descriptionHtml, productType, vendor, status, variants[], options[], media[], metafields[], etc.).
Response
200
{
"success": true,
"data": {
"_id": "507f1f77bcf86cd799439013",
"shopifyId": "gid://shopify/Product/7890123456789",
"title": "Updated Product",
"status": "active",
"variants": [ /* ... */ ]
}
}
Example
curl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
-H "x-access-token: YOUR_VENDOR_JWT" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Product",
"status": "active",
"variants": [
{ "price": "29.99", "sku": "ACME-001", "inventoryQuantity": 50 }
]
}'
More Examples
Update title and tagscurl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
-H "x-access-token: YOUR_VENDOR_JWT" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Product Name",
"tags": ["new-tag", "sale"]
}'
curl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
-H "x-access-token: YOUR_VENDOR_JWT" \
-H "Content-Type: application/json" \
-d '{
"variants": [
{
"title": "XL / Red",
"price": "34.99",
"sku": "TEE-RED-XL",
"inventoryQuantity": 25
}
]
}'
Was this page helpful?
⌘I