Update inventory
curl --request PATCH \
--url https://shelfforce.ai/api/v1/inventory/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sku": "<string>",
"brand": "<string>",
"name": "<string>",
"category": "<string>",
"subcategory": "<string>",
"sizeValue": 123,
"sizeUnit": "<string>",
"expectedPrice": 123,
"currency": "<string>",
"upc": "<string>"
}
'import requests
url = "https://shelfforce.ai/api/v1/inventory/{id}"
payload = {
"sku": "<string>",
"brand": "<string>",
"name": "<string>",
"category": "<string>",
"subcategory": "<string>",
"sizeValue": 123,
"sizeUnit": "<string>",
"expectedPrice": 123,
"currency": "<string>",
"upc": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sku: '<string>',
brand: '<string>',
name: '<string>',
category: '<string>',
subcategory: '<string>',
sizeValue: 123,
sizeUnit: '<string>',
expectedPrice: 123,
currency: '<string>',
upc: '<string>'
})
};
fetch('https://shelfforce.ai/api/v1/inventory/{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://shelfforce.ai/api/v1/inventory/{id}",
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([
'sku' => '<string>',
'brand' => '<string>',
'name' => '<string>',
'category' => '<string>',
'subcategory' => '<string>',
'sizeValue' => 123,
'sizeUnit' => '<string>',
'expectedPrice' => 123,
'currency' => '<string>',
'upc' => '<string>'
]),
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://shelfforce.ai/api/v1/inventory/{id}"
payload := strings.NewReader("{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://shelfforce.ai/api/v1/inventory/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://shelfforce.ai/api/v1/inventory/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Update inventory
Updates one or more fields on an existing inventory item.
PATCH
/
api
/
v1
/
inventory
/
{id}
Update inventory
curl --request PATCH \
--url https://shelfforce.ai/api/v1/inventory/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sku": "<string>",
"brand": "<string>",
"name": "<string>",
"category": "<string>",
"subcategory": "<string>",
"sizeValue": 123,
"sizeUnit": "<string>",
"expectedPrice": 123,
"currency": "<string>",
"upc": "<string>"
}
'import requests
url = "https://shelfforce.ai/api/v1/inventory/{id}"
payload = {
"sku": "<string>",
"brand": "<string>",
"name": "<string>",
"category": "<string>",
"subcategory": "<string>",
"sizeValue": 123,
"sizeUnit": "<string>",
"expectedPrice": 123,
"currency": "<string>",
"upc": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sku: '<string>',
brand: '<string>',
name: '<string>',
category: '<string>',
subcategory: '<string>',
sizeValue: 123,
sizeUnit: '<string>',
expectedPrice: 123,
currency: '<string>',
upc: '<string>'
})
};
fetch('https://shelfforce.ai/api/v1/inventory/{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://shelfforce.ai/api/v1/inventory/{id}",
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([
'sku' => '<string>',
'brand' => '<string>',
'name' => '<string>',
'category' => '<string>',
'subcategory' => '<string>',
'sizeValue' => 123,
'sizeUnit' => '<string>',
'expectedPrice' => 123,
'currency' => '<string>',
'upc' => '<string>'
]),
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://shelfforce.ai/api/v1/inventory/{id}"
payload := strings.NewReader("{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://shelfforce.ai/api/v1/inventory/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://shelfforce.ai/api/v1/inventory/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sku\": \"<string>\",\n \"brand\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"subcategory\": \"<string>\",\n \"sizeValue\": 123,\n \"sizeUnit\": \"<string>\",\n \"expectedPrice\": 123,\n \"currency\": \"<string>\",\n \"upc\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
API key with sf_live_ prefix. Pass as Authorization: Bearer sf_live_...
Headers
Unique key for idempotent requests. If a request with the same key was already processed within the last 24 hours, the cached response is returned with X-Idempotent-Replayed: true.
Example:
"idk_550e8400-e29b-41d4-a716-446655440000"
Path Parameters
Inventory item ID.
Example:
"inv_a1b2c3"
Body
application/json
Example:
"CC-330ML-CAN"
Example:
"Coca-Cola"
Example:
"Coca-Cola Original 330ml Can"
Example:
"Beverages"
Example:
"Carbonated Soft Drinks"
Example:
330
Example:
"ml"
Example:
1.49
Example:
"USD"
Example:
"049000042566"
Response
Inventory item updated.
Show child attributes
Show child attributes
⌘I