curl --request PATCH \
--url https://api-neteven.mylectra.com/merchant/items/stocks \
--header 'Accept: <accept>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"items": [
{
"sku": "ABCDX123_XS",
"quantity": 123,
"warehouses": [
{
"id": 123,
"sku": "<string>",
"stock": 123,
"shipped_stock": 123
}
]
}
]
}
'import requests
url = "https://api-neteven.mylectra.com/merchant/items/stocks"
payload = { "items": [
{
"sku": "ABCDX123_XS",
"quantity": 123,
"warehouses": [
{
"id": 123,
"sku": "<string>",
"stock": 123,
"shipped_stock": 123
}
]
}
] }
headers = {
"Authorization": "<authorization>",
"Accept": "<accept>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
Accept: '<accept>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
items: [
{
sku: 'ABCDX123_XS',
quantity: 123,
warehouses: [{id: 123, sku: '<string>', stock: 123, shipped_stock: 123}]
}
]
})
};
fetch('https://api-neteven.mylectra.com/merchant/items/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-neteven.mylectra.com/merchant/items/stocks",
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([
'items' => [
[
'sku' => 'ABCDX123_XS',
'quantity' => 123,
'warehouses' => [
[
'id' => 123,
'sku' => '<string>',
'stock' => 123,
'shipped_stock' => 123
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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-neteven.mylectra.com/merchant/items/stocks"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-neteven.mylectra.com/merchant/items/stocks")
.header("Authorization", "<authorization>")
.header("Accept", "<accept>")
.header("Content-Type", "<content-type>")
.body("{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-neteven.mylectra.com/merchant/items/stocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Accept"] = '<accept>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"items": [
{
"sku": "ABCDX123_XS",
"status": {
"message": "Message description",
"code": 400,
"title": "Message Title"
}
}
]
},
"metadata": {
"number_of_results": 123,
"total_count": 123,
"limit": 123,
"offset": 123,
"api_version": 123,
"api_version_expiration_date": "2023-12-25",
"messages": [
{
"type": "INFO",
"description": "This is the last update"
}
]
}
}{
"status": "error",
"errors": [
{
"location": "querystring",
"name": "bad-query-param-name",
"description": {
"0": {
"quantity": [
"Not a valid integer."
]
}
}
}
]
}{
"message": "Message description",
"code": 400,
"title": "Message Title"
}Update a list of sku with their quantities.
Update stock levels on your account SKU’s. The corresponding products must already exist in your Neteven inventory.
curl --request PATCH \
--url https://api-neteven.mylectra.com/merchant/items/stocks \
--header 'Accept: <accept>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"items": [
{
"sku": "ABCDX123_XS",
"quantity": 123,
"warehouses": [
{
"id": 123,
"sku": "<string>",
"stock": 123,
"shipped_stock": 123
}
]
}
]
}
'import requests
url = "https://api-neteven.mylectra.com/merchant/items/stocks"
payload = { "items": [
{
"sku": "ABCDX123_XS",
"quantity": 123,
"warehouses": [
{
"id": 123,
"sku": "<string>",
"stock": 123,
"shipped_stock": 123
}
]
}
] }
headers = {
"Authorization": "<authorization>",
"Accept": "<accept>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
Accept: '<accept>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
items: [
{
sku: 'ABCDX123_XS',
quantity: 123,
warehouses: [{id: 123, sku: '<string>', stock: 123, shipped_stock: 123}]
}
]
})
};
fetch('https://api-neteven.mylectra.com/merchant/items/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-neteven.mylectra.com/merchant/items/stocks",
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([
'items' => [
[
'sku' => 'ABCDX123_XS',
'quantity' => 123,
'warehouses' => [
[
'id' => 123,
'sku' => '<string>',
'stock' => 123,
'shipped_stock' => 123
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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-neteven.mylectra.com/merchant/items/stocks"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-neteven.mylectra.com/merchant/items/stocks")
.header("Authorization", "<authorization>")
.header("Accept", "<accept>")
.header("Content-Type", "<content-type>")
.body("{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-neteven.mylectra.com/merchant/items/stocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Accept"] = '<accept>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"items\": [\n {\n \"sku\": \"ABCDX123_XS\",\n \"quantity\": 123,\n \"warehouses\": [\n {\n \"id\": 123,\n \"sku\": \"<string>\",\n \"stock\": 123,\n \"shipped_stock\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"items": [
{
"sku": "ABCDX123_XS",
"status": {
"message": "Message description",
"code": 400,
"title": "Message Title"
}
}
]
},
"metadata": {
"number_of_results": 123,
"total_count": 123,
"limit": 123,
"offset": 123,
"api_version": 123,
"api_version_expiration_date": "2023-12-25",
"messages": [
{
"type": "INFO",
"description": "This is the last update"
}
]
}
}{
"status": "error",
"errors": [
{
"location": "querystring",
"name": "bad-query-param-name",
"description": {
"0": {
"quantity": [
"Not a valid integer."
]
}
}
}
]
}{
"message": "Message description",
"code": 400,
"title": "Message Title"
}Headers
Bearer JWT token, used to authenticate.
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJyb2xlcyI6WyJwcm9kdWN0X21hbmFnZXIiLCJ3YXJlaG91c2VfbWFuYWdlciIsIm9yZGVyX21hbmFnZXIiLCJzdG9ja19tYW5hZ2VyIiwicHJpY2VfbWFuYWdlciIsIjEwMDAiXSwiaXNzIjoiYXBpLm5ldGV2ZW4uY29tIiwibG9naW4iOiJhcGktdGVzdC1hY2NvdW50QGVtYWlsLmNvbSIsInJldGFpbGVyX2lkIjpudWxsLCJkZWJ1ZyI6ZmFsc2UsImRlYnVnX2V4cGlyYXRpb25fZHR0IjpudWxsLCJzdWIiOjEwMDAsImlhdCI6MTYzMjEyNTEwNiwiZXhwIjoxNjMyMjExNTA2LCJhdWQiOiJhcGkubmV0ZXZlbi5jb20ifQ.3GfC01HmJl0PS2w16gIcoxgLN52vG5kkDhqNmrkkR4zIGK7ecVfFaZhQ4KCQnimwjWTrExszIE6Oc6d-hC0g-Q"
Body
An array of items to be updated, with their corresponding quantities.
Response
Confirm that the entire request was processed successfuly.

