Update Product Status
curl --request PATCH \
--url https://production-api.puppetvendors.com/products/{productId}/status \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"status": "<string>"
}
'import requests
url = "https://production-api.puppetvendors.com/products/{productId}/status"
payload = { "status": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: '<string>'})
};
fetch('https://production-api.puppetvendors.com/products/{productId}/status', 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/products/{productId}/status",
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([
'status' => '<string>'
]),
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/products/{productId}/status"
payload := strings.NewReader("{\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://production-api.puppetvendors.com/products/{productId}/status")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/products/{productId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyProducts
Update Product Status
Change a product’s status to ACTIVE or DRAFT
PATCH
/
products
/
{productId}
/
status
Update Product Status
curl --request PATCH \
--url https://production-api.puppetvendors.com/products/{productId}/status \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"status": "<string>"
}
'import requests
url = "https://production-api.puppetvendors.com/products/{productId}/status"
payload = { "status": "<string>" }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: '<string>'})
};
fetch('https://production-api.puppetvendors.com/products/{productId}/status', 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/products/{productId}/status",
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([
'status' => '<string>'
]),
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/products/{productId}/status"
payload := strings.NewReader("{\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://production-api.puppetvendors.com/products/{productId}/status")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production-api.puppetvendors.com/products/{productId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyV2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Change a product’s status without updating any other fields. This is a lightweight way to publish or unpublish a product. Vendor tokens can only update their own products. If the shop has product approval enabled, setting status toACTIVE may place the product into a pending state instead, requiring merchant approval before it goes live.
Use Cases
- Publish a draft product to the storefront
- Temporarily unpublish a product by switching it to draft
- Quickly toggle product visibility without a full product update
Required Scope
products:write
Path Parameters
string
required
Product ID (Shopify numeric, GID, or MongoDB ObjectId).
Request Body
string
required
The new status. Must be one of
ACTIVE or DRAFT.Response
200
{
"success": true,
"data": {
"_id": "507f1f77bcf86cd799439013",
"title": "Organic Cotton Tee",
"status": "active"
}
}
403
{
"success": false,
"error": {
"message": "Updating products is disabled for this vendor",
"code": "FORBIDDEN"
}
}
404
{
"success": false,
"error": {
"message": "Product not found",
"code": "PRODUCT_NOT_FOUND"
}
}
Example
curl -X PATCH "https://production-api.puppetvendors.com/products/507f1f77bcf86cd799439013/status" \
-H "x-access-token: YOUR_VENDOR_JWT" \
-H "Content-Type: application/json" \
-d '{"status": "ACTIVE"}'
Was this page helpful?
⌘I