Update Inventory
curl --request POST \
--url https://api.wizcommerce.com/v1/inventories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sku": "SKU-001",
"inventory_status": "IN_STOCK",
"available_quantity": 100,
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"back_order_allowed": true,
"out_of_stock_threshold": 100,
"track_inventory": true,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "on_order_0"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "in_transit_0"
}
],
"dynamic_details": "{\"key\":\"value\"}",
"notes": "Notes"
}
'import requests
url = "https://api.wizcommerce.com/v1/inventories"
payload = {
"sku": "SKU-001",
"inventory_status": "IN_STOCK",
"available_quantity": 100,
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"back_order_allowed": True,
"out_of_stock_threshold": 100,
"track_inventory": True,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "on_order_0"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "in_transit_0"
}
],
"dynamic_details": "{\"key\":\"value\"}",
"notes": "Notes"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sku: 'SKU-001',
inventory_status: 'IN_STOCK',
available_quantity: 100,
reserved_quantity: 100,
in_stock_quantity: 100,
back_order_quantity: 100,
back_order_allowed: true,
out_of_stock_threshold: 100,
track_inventory: true,
on_order_details: [{quantity: 100, date: '2025-01-01T00:00:00Z', identifier: 'on_order_0'}],
in_transit_details: [{quantity: 100, date: '2025-01-01T00:00:00Z', identifier: 'in_transit_0'}],
dynamic_details: '{"key":"value"}',
notes: 'Notes'
})
};
fetch('https://api.wizcommerce.com/v1/inventories', 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.wizcommerce.com/v1/inventories",
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([
'sku' => 'SKU-001',
'inventory_status' => 'IN_STOCK',
'available_quantity' => 100,
'reserved_quantity' => 100,
'in_stock_quantity' => 100,
'back_order_quantity' => 100,
'back_order_allowed' => true,
'out_of_stock_threshold' => 100,
'track_inventory' => true,
'on_order_details' => [
[
'quantity' => 100,
'date' => '2025-01-01T00:00:00Z',
'identifier' => 'on_order_0'
]
],
'in_transit_details' => [
[
'quantity' => 100,
'date' => '2025-01-01T00:00:00Z',
'identifier' => 'in_transit_0'
]
],
'dynamic_details' => '{"key":"value"}',
'notes' => 'Notes'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://api.wizcommerce.com/v1/inventories"
payload := strings.NewReader("{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.post("https://api.wizcommerce.com/v1/inventories")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/inventories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"product_id": "1234567890",
"available_quantity": 100,
"sku": "SKU-001",
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"inventory_status": "IN_STOCK",
"status": "active",
"track_inventory": true,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01",
"identifier": "1234567890"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01",
"identifier": "1234567890"
}
],
"notes": "Notes",
"back_order_allowed": true,
"created_at": "2025-01-01T15:04:05Z",
"updated_at": "2025-01-01T15:04:05Z"
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Inventory
Save Inventory
Using this API we can save the inventory details. If the inventory details are not present, it will be created. If the inventory details are present, it will be updated.
POST
/
v1
/
inventories
Update Inventory
curl --request POST \
--url https://api.wizcommerce.com/v1/inventories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sku": "SKU-001",
"inventory_status": "IN_STOCK",
"available_quantity": 100,
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"back_order_allowed": true,
"out_of_stock_threshold": 100,
"track_inventory": true,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "on_order_0"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "in_transit_0"
}
],
"dynamic_details": "{\"key\":\"value\"}",
"notes": "Notes"
}
'import requests
url = "https://api.wizcommerce.com/v1/inventories"
payload = {
"sku": "SKU-001",
"inventory_status": "IN_STOCK",
"available_quantity": 100,
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"back_order_allowed": True,
"out_of_stock_threshold": 100,
"track_inventory": True,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "on_order_0"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01T00:00:00Z",
"identifier": "in_transit_0"
}
],
"dynamic_details": "{\"key\":\"value\"}",
"notes": "Notes"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sku: 'SKU-001',
inventory_status: 'IN_STOCK',
available_quantity: 100,
reserved_quantity: 100,
in_stock_quantity: 100,
back_order_quantity: 100,
back_order_allowed: true,
out_of_stock_threshold: 100,
track_inventory: true,
on_order_details: [{quantity: 100, date: '2025-01-01T00:00:00Z', identifier: 'on_order_0'}],
in_transit_details: [{quantity: 100, date: '2025-01-01T00:00:00Z', identifier: 'in_transit_0'}],
dynamic_details: '{"key":"value"}',
notes: 'Notes'
})
};
fetch('https://api.wizcommerce.com/v1/inventories', 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.wizcommerce.com/v1/inventories",
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([
'sku' => 'SKU-001',
'inventory_status' => 'IN_STOCK',
'available_quantity' => 100,
'reserved_quantity' => 100,
'in_stock_quantity' => 100,
'back_order_quantity' => 100,
'back_order_allowed' => true,
'out_of_stock_threshold' => 100,
'track_inventory' => true,
'on_order_details' => [
[
'quantity' => 100,
'date' => '2025-01-01T00:00:00Z',
'identifier' => 'on_order_0'
]
],
'in_transit_details' => [
[
'quantity' => 100,
'date' => '2025-01-01T00:00:00Z',
'identifier' => 'in_transit_0'
]
],
'dynamic_details' => '{"key":"value"}',
'notes' => 'Notes'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://api.wizcommerce.com/v1/inventories"
payload := strings.NewReader("{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.post("https://api.wizcommerce.com/v1/inventories")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/inventories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sku\": \"SKU-001\",\n \"inventory_status\": \"IN_STOCK\",\n \"available_quantity\": 100,\n \"reserved_quantity\": 100,\n \"in_stock_quantity\": 100,\n \"back_order_quantity\": 100,\n \"back_order_allowed\": true,\n \"out_of_stock_threshold\": 100,\n \"track_inventory\": true,\n \"on_order_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"on_order_0\"\n }\n ],\n \"in_transit_details\": [\n {\n \"quantity\": 100,\n \"date\": \"2025-01-01T00:00:00Z\",\n \"identifier\": \"in_transit_0\"\n }\n ],\n \"dynamic_details\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"notes\": \"Notes\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"product_id": "1234567890",
"available_quantity": 100,
"sku": "SKU-001",
"reserved_quantity": 100,
"in_stock_quantity": 100,
"back_order_quantity": 100,
"inventory_status": "IN_STOCK",
"status": "active",
"track_inventory": true,
"on_order_details": [
{
"quantity": 100,
"date": "2025-01-01",
"identifier": "1234567890"
}
],
"in_transit_details": [
{
"quantity": 100,
"date": "2025-01-01",
"identifier": "1234567890"
}
],
"notes": "Notes",
"back_order_allowed": true,
"created_at": "2025-01-01T15:04:05Z",
"updated_at": "2025-01-01T15:04:05Z"
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Authorizations
API Key for authentication
Body
application/json
Inventory Create or Update Request
Maximum string length:
255Example:
"SKU-001"
Available options:
OUT_OF_STOCK, IN_STOCK, BACK_ORDER Example:
"IN_STOCK"
Example:
100
Example:
100
Example:
100
Example:
100
Example:
true
Example:
100
Example:
true
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"{\"key\":\"value\"}"
HTML content
Example:
"Notes"
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I
