Upsert Inventory
curl --request POST \
--url 'https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory' \
--header 'Content-Type: application/json' \
--data '
{
"inventory_updates": [
{}
]
}
'import requests
url = "https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory"
payload = { "inventory_updates": [{}] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({inventory_updates: [{}]})
};
fetch('https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory', 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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory",
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([
'inventory_updates' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory"
payload := strings.NewReader("{\n \"inventory_updates\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory")
.header("Content-Type", "application/json")
.body("{\n \"inventory_updates\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"inventory_updates\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyCatalog
Upsert Inventory
This endpoint allows you to update inventory information for specific products in a store. You can modify quantity, status, price, and location for existing products using their external_id.
POST
{micro_service_base_url}
/
inventory-service-v2
/
companies
/
1000019
/
store
/
449235c1-3d04-4519-998b-40d2a621e5e0
/
inventory
Upsert Inventory
curl --request POST \
--url 'https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory' \
--header 'Content-Type: application/json' \
--data '
{
"inventory_updates": [
{}
]
}
'import requests
url = "https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory"
payload = { "inventory_updates": [{}] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({inventory_updates: [{}]})
};
fetch('https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory', 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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory",
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([
'inventory_updates' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory"
payload := strings.NewReader("{\n \"inventory_updates\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory")
.header("Content-Type", "application/json")
.body("{\n \"inventory_updates\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"inventory_updates\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyThis endpoint updates inventory details for products that already exist in your store. Use this to adjust stock levels, prices, product status, and storage locations.
The system will process your inventory updates in the background. Changes will be reflected in your store’s inventory once processing is complete.
This endpoint only updates existing products. To add new products, use the Upsert Products endpoints.
Body
An array of inventory update objects
Show Inventory Update Object Structure
Show Inventory Update Object Structure
Request Example
[
{
"external_id": "22000017901",
"quantity": 50,
"status": "inactive",
"price": 99.8,
"location": "WAREHOUSE-CDT"
},
{
"external_id": "28400324434",
"quantity": 50,
"status": "active",
"price": 9,
"location": "WAREHOUSE-CDT"
},
{
"external_id": "22000017895",
"quantity": 1,
"status": "active",
"price": 19.12,
"location": "Jayy-B"
}
]
Response
This endpoint processes the inventory updates asynchronously. No immediate response body is provided.
Setting quantity to 0 will mark the product as out of stock. Use “inactive” status to temporarily disable a product from being sold.
⌘I

