Create
curl --request POST \
--url https://api-staging.genuka.com/2023-11/admin/stocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"quantity": 15,
"quantity_alert": 5,
"stocks_warehouse": [
{
"is_new": true,
"quantity": 50,
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Action Short / Navy"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/stocks"
payload = {
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"quantity": 15,
"quantity_alert": 5,
"stocks_warehouse": [
{
"is_new": True,
"quantity": 50,
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Action Short / Navy"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_variant_id: '01k77apj286gns7ap98hn5ejhc',
quantity: 15,
quantity_alert: 5,
stocks_warehouse: [{is_new: true, quantity: 50, warehouse_id: '01k1amyq271bm81tncbepdxa2j'}],
title: 'Action Short / Navy'
})
};
fetch('https://api-staging.genuka.com/2023-11/admin/stocks', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_variant_id' => '01k77apj286gns7ap98hn5ejhc',
'quantity' => 15,
'quantity_alert' => 5,
'stocks_warehouse' => [
[
'is_new' => true,
'quantity' => 50,
'warehouse_id' => '01k1amyq271bm81tncbepdxa2j'
]
],
'title' => 'Action Short / Navy'
]),
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"
payload := strings.NewReader("{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-staging.genuka.com/2023-11/admin/stocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/stocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}"
response = http.request(request)
puts response.read_body{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-10T15:12:53.000000Z",
"id": "01k77ax6n3vcmxbyt0env1zkar",
"media": [],
"medias": [],
"price": null,
"product_variant": {
"barcode": null,
"base_title": "Default Title",
"buffer_minutes": 0,
"compare_at_price": null,
"composite_stocks": [],
"created_at": "2025-10-10T15:09:15.000000Z",
"deleted_at": null,
"deposit": null,
"duration_minutes": 0,
"estimated_quantity": 50,
"estimated_quantity_by_warehouse": {
"01k1amyq271bm81tncbepdxa2j": 50
},
"follow_stock": 1,
"id": "01k77apj286gns7ap98hn5ejhc",
"image_id": null,
"metadata": null,
"min_order_quantity": 1,
"options": [
"01heb9kba8d8fgh58vpp72yw86"
],
"position": 1,
"price": 6500,
"product_id": "01k77apj1gvqheyjjqx5pzfkrn",
"professionals": [],
"service": {
"buffer_minutes": 0,
"created_at": "2025-10-10T15:09:15.000000Z",
"deleted_at": null,
"deposit": null,
"duration_minutes": 0,
"id": "01k77apj2vjttkanj2v90572dx",
"metadata": null,
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"professionals": [],
"updated_at": "2025-10-10T15:09:15.000000Z"
},
"service_id": "01k77apj2vjttkanj2v90572dx",
"sku": "le paquet",
"supplierproduct": null,
"taxable": 1,
"title": "Default Title",
"updated_at": "2025-10-10T15:12:53.000000Z",
"whatsapp_product_id": null
},
"product_variant_compositions": [],
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"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": "Action Short / Navy",
"updated_at": "2025-10-10T15:12:53.000000Z"
}Stocks
Create stock
Creates a new stock entry for a specific product or warehouse. This endpoint allows defining stock quantity, associated product, warehouse location, and optional metadata such as batch number or expiration date. Once created, the stock entry becomes available for inventory tracking and updates.
POST
/
2023-11
/
admin
/
stocks
Create
curl --request POST \
--url https://api-staging.genuka.com/2023-11/admin/stocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"quantity": 15,
"quantity_alert": 5,
"stocks_warehouse": [
{
"is_new": true,
"quantity": 50,
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Action Short / Navy"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/stocks"
payload = {
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"quantity": 15,
"quantity_alert": 5,
"stocks_warehouse": [
{
"is_new": True,
"quantity": 50,
"warehouse_id": "01k1amyq271bm81tncbepdxa2j"
}
],
"title": "Action Short / Navy"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_variant_id: '01k77apj286gns7ap98hn5ejhc',
quantity: 15,
quantity_alert: 5,
stocks_warehouse: [{is_new: true, quantity: 50, warehouse_id: '01k1amyq271bm81tncbepdxa2j'}],
title: 'Action Short / Navy'
})
};
fetch('https://api-staging.genuka.com/2023-11/admin/stocks', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_variant_id' => '01k77apj286gns7ap98hn5ejhc',
'quantity' => 15,
'quantity_alert' => 5,
'stocks_warehouse' => [
[
'is_new' => true,
'quantity' => 50,
'warehouse_id' => '01k1amyq271bm81tncbepdxa2j'
]
],
'title' => 'Action Short / Navy'
]),
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"
payload := strings.NewReader("{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-staging.genuka.com/2023-11/admin/stocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/stocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_variant_id\": \"01k77apj286gns7ap98hn5ejhc\",\n \"quantity\": 15,\n \"quantity_alert\": 5,\n \"stocks_warehouse\": [\n {\n \"is_new\": true,\n \"quantity\": 50,\n \"warehouse_id\": \"01k1amyq271bm81tncbepdxa2j\"\n }\n ],\n \"title\": \"Action Short / Navy\"\n}"
response = http.request(request)
puts response.read_body{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-10T15:12:53.000000Z",
"id": "01k77ax6n3vcmxbyt0env1zkar",
"media": [],
"medias": [],
"price": null,
"product_variant": {
"barcode": null,
"base_title": "Default Title",
"buffer_minutes": 0,
"compare_at_price": null,
"composite_stocks": [],
"created_at": "2025-10-10T15:09:15.000000Z",
"deleted_at": null,
"deposit": null,
"duration_minutes": 0,
"estimated_quantity": 50,
"estimated_quantity_by_warehouse": {
"01k1amyq271bm81tncbepdxa2j": 50
},
"follow_stock": 1,
"id": "01k77apj286gns7ap98hn5ejhc",
"image_id": null,
"metadata": null,
"min_order_quantity": 1,
"options": [
"01heb9kba8d8fgh58vpp72yw86"
],
"position": 1,
"price": 6500,
"product_id": "01k77apj1gvqheyjjqx5pzfkrn",
"professionals": [],
"service": {
"buffer_minutes": 0,
"created_at": "2025-10-10T15:09:15.000000Z",
"deleted_at": null,
"deposit": null,
"duration_minutes": 0,
"id": "01k77apj2vjttkanj2v90572dx",
"metadata": null,
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"professionals": [],
"updated_at": "2025-10-10T15:09:15.000000Z"
},
"service_id": "01k77apj2vjttkanj2v90572dx",
"sku": "le paquet",
"supplierproduct": null,
"taxable": 1,
"title": "Default Title",
"updated_at": "2025-10-10T15:12:53.000000Z",
"whatsapp_product_id": null
},
"product_variant_compositions": [],
"product_variant_id": "01k77apj286gns7ap98hn5ejhc",
"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": "Action Short / Navy",
"updated_at": "2025-10-10T15:12:53.000000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"{{companyId}}"
Body
application/json
Response
201 - application/json
201
Example:
"01hqydxwtxdj3kmzp3bz7jk73g"
Example:
"2025-10-10T15:12:53.000000Z"
Example:
"01k77ax6n3vcmxbyt0env1zkar"
Example:
[]
Example:
[]
Show child attributes
Show child attributes
Example:
[]
Example:
"01k77apj286gns7ap98hn5ejhc"
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:
"Action Short / Navy"
Example:
"2025-10-10T15:12:53.000000Z"
⌘I
