Update stock and price
curl --request PATCH \
--url https://live.nocnocstore.com/api/v2/products/sku/{sku} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"available_quantity": 123,
"price": 123,
"currency_code": "<string>"
}
'import requests
url = "https://live.nocnocstore.com/api/v2/products/sku/{sku}"
payload = {
"available_quantity": 123,
"price": 123,
"currency_code": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({available_quantity: 123, price: 123, currency_code: '<string>'})
};
fetch('https://live.nocnocstore.com/api/v2/products/sku/{sku}', 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://live.nocnocstore.com/api/v2/products/sku/{sku}",
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([
'available_quantity' => 123,
'price' => 123,
'currency_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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://live.nocnocstore.com/api/v2/products/sku/{sku}"
payload := strings.NewReader("{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<x-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://live.nocnocstore.com/api/v2/products/sku/{sku}")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://live.nocnocstore.com/api/v2/products/sku/{sku}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sku": "MY-SKU-001",
"available_quantity": 75,
"price": 24.99,
"currency_code": "USD"
}
{
"code": 400,
"message": "Invalid Request Payload.",
"errors": [
"available_quantity or price is required."
]
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Sku not found"
}
Products
Update stock and price
Updates the stock quantity and/or price of an existing product.
PATCH
/
api
/
v2
/
products
/
sku
/
{sku}
Update stock and price
curl --request PATCH \
--url https://live.nocnocstore.com/api/v2/products/sku/{sku} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"available_quantity": 123,
"price": 123,
"currency_code": "<string>"
}
'import requests
url = "https://live.nocnocstore.com/api/v2/products/sku/{sku}"
payload = {
"available_quantity": 123,
"price": 123,
"currency_code": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({available_quantity: 123, price: 123, currency_code: '<string>'})
};
fetch('https://live.nocnocstore.com/api/v2/products/sku/{sku}', 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://live.nocnocstore.com/api/v2/products/sku/{sku}",
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([
'available_quantity' => 123,
'price' => 123,
'currency_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-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://live.nocnocstore.com/api/v2/products/sku/{sku}"
payload := strings.NewReader("{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<x-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://live.nocnocstore.com/api/v2/products/sku/{sku}")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://live.nocnocstore.com/api/v2/products/sku/{sku}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"available_quantity\": 123,\n \"price\": 123,\n \"currency_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sku": "MY-SKU-001",
"available_quantity": 75,
"price": 24.99,
"currency_code": "USD"
}
{
"code": 400,
"message": "Invalid Request Payload.",
"errors": [
"available_quantity or price is required."
]
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Sku not found"
}
Requests go to the live environment — all actions are real.
At least one of
available_quantity or price must be provided. If price is provided, currency_code is required.Authorization
string
required
Your seller API key. Provided by your nocnoc account manager.
Path parameters
string
required
The SKU of the product to update.
Body parameters
integer
New stock quantity. Between 0 and 9999. Required if
price is not provided.number
New price. Required if
available_quantity is not provided.string
Currency code (ISO). Required if
price is provided. Currently only USD is supported.Returns
The updated product object reflecting the new stock and/or price.{
"sku": "MY-SKU-001",
"available_quantity": 75,
"price": 24.99,
"currency_code": "USD"
}
{
"code": 400,
"message": "Invalid Request Payload.",
"errors": [
"available_quantity or price is required."
]
}
{
"code": 401,
"message": "Unauthorized"
}
{
"code": 404,
"message": "Sku not found"
}
⌘I