Update
curl --request PUT \
--url https://api-staging.genuka.com/2023-11/admin/stocks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Taro - 1 (updated)"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/stocks/{id}"
payload = { "title": "Taro - 1 (updated)" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Taro - 1 (updated)'})
};
fetch('https://api-staging.genuka.com/2023-11/admin/stocks/{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_URL => "https://api-staging.genuka.com/2023-11/admin/stocks/{id}",
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([
'title' => 'Taro - 1 (updated)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api-staging.genuka.com/2023-11/admin/stocks/{id}"
payload := strings.NewReader("{\n \"title\": \"Taro - 1 (updated)\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api-staging.genuka.com/2023-11/admin/stocks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Taro - 1 (updated)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/stocks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Taro - 1 (updated)\"\n}"
response = http.request(request)
puts response.read_body{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-10T15:12:53.000000Z",
"id": "01k77ax6n3vcmxbyt0env1zkar",
"medias": [],
"price": null,
"product_variant": null,
"product_variant_compositions": [],
"product_variant_id": null,
"quantity": 50,
"quantity_alert": 5,
"stocks_warehouse": [
{
"batch_number": null,
"created_at": "2025-10-10T15:12:53.000000Z",
"expiration_date": null,
"id": "1742",
"metadata": null,
"production_date": null,
"quantity": 50,
"stock_id": "01k77ax6n3vcmxbyt0env1zkar",
"updated_at": "2025-10-10T15:12:53.000000Z",
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Taro - 1 (updated)",
"updated_at": "2025-10-10T15:15:35.000000Z"
}Stocks
Update stock
Updates the details of an existing stock entry identified by its unique ID. This endpoint allows modifying stock quantities, warehouse assignments, or related metadata. It returns the updated stock data upon success and ensures accurate inventory synchronization.
PUT
/
2023-11
/
admin
/
stocks
/
{id}
Update
curl --request PUT \
--url https://api-staging.genuka.com/2023-11/admin/stocks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Taro - 1 (updated)"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/stocks/{id}"
payload = { "title": "Taro - 1 (updated)" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Taro - 1 (updated)'})
};
fetch('https://api-staging.genuka.com/2023-11/admin/stocks/{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_URL => "https://api-staging.genuka.com/2023-11/admin/stocks/{id}",
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([
'title' => 'Taro - 1 (updated)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api-staging.genuka.com/2023-11/admin/stocks/{id}"
payload := strings.NewReader("{\n \"title\": \"Taro - 1 (updated)\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api-staging.genuka.com/2023-11/admin/stocks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Taro - 1 (updated)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/stocks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Taro - 1 (updated)\"\n}"
response = http.request(request)
puts response.read_body{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-10T15:12:53.000000Z",
"id": "01k77ax6n3vcmxbyt0env1zkar",
"medias": [],
"price": null,
"product_variant": null,
"product_variant_compositions": [],
"product_variant_id": null,
"quantity": 50,
"quantity_alert": 5,
"stocks_warehouse": [
{
"batch_number": null,
"created_at": "2025-10-10T15:12:53.000000Z",
"expiration_date": null,
"id": "1742",
"metadata": null,
"production_date": null,
"quantity": 50,
"stock_id": "01k77ax6n3vcmxbyt0env1zkar",
"updated_at": "2025-10-10T15:12:53.000000Z",
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Taro - 1 (updated)",
"updated_at": "2025-10-10T15:15:35.000000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"{{companyId}}"
Path Parameters
Body
application/json
Example:
"Taro - 1 (updated)"
Response
200 - application/json
200
Example:
"01hqydxwtxdj3kmzp3bz7jk73g"
Example:
"2025-10-10T15:12:53.000000Z"
Example:
"01k77ax6n3vcmxbyt0env1zkar"
Example:
[]
Example:
[]
Example:
50
Example:
5
Show child attributes
Show child attributes
Example:
[ { "batch_number": null, "created_at": "2025-10-10T15:12:53.000000Z", "expiration_date": null, "id": "1742", "metadata": null, "production_date": null, "quantity": 50, "stock_id": "01k77ax6n3vcmxbyt0env1zkar", "updated_at": "2025-10-10T15:12:53.000000Z", "warehouse_id": "01k1amyq271bm81tncbepdxa2j" } ]
Example:
"Taro - 1 (updated)"
Example:
"2025-10-10T15:15:35.000000Z"
⌘I
