curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"adjustment_entries": [
{
"warehouse_id": 123,
"location_id": 123,
"qty_onhand": 123,
"product_id": 123,
"sku": "<string>",
"lot_id": 123,
"lot_number": "<string>",
"lot_name": "<string>",
"create_lot": true,
"production_date": "2023-12-25",
"expiry_date": "2023-12-25",
"manufacturer_code": "<string>"
}
],
"remarks": "<string>"
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments"
payload = {
"adjustment_entries": [
{
"warehouse_id": 123,
"location_id": 123,
"qty_onhand": 123,
"product_id": 123,
"sku": "<string>",
"lot_id": 123,
"lot_number": "<string>",
"lot_name": "<string>",
"create_lot": True,
"production_date": "2023-12-25",
"expiry_date": "2023-12-25",
"manufacturer_code": "<string>"
}
],
"remarks": "<string>"
}
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({
adjustment_entries: [
{
warehouse_id: 123,
location_id: 123,
qty_onhand: 123,
product_id: 123,
sku: '<string>',
lot_id: 123,
lot_number: '<string>',
lot_name: '<string>',
create_lot: true,
production_date: '2023-12-25',
expiry_date: '2023-12-25',
manufacturer_code: '<string>'
}
],
remarks: '<string>'
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments', 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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments",
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([
'adjustment_entries' => [
[
'warehouse_id' => 123,
'location_id' => 123,
'qty_onhand' => 123,
'product_id' => 123,
'sku' => '<string>',
'lot_id' => 123,
'lot_number' => '<string>',
'lot_name' => '<string>',
'create_lot' => true,
'production_date' => '2023-12-25',
'expiry_date' => '2023-12-25',
'manufacturer_code' => '<string>'
]
],
'remarks' => '<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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments"
payload := strings.NewReader("{\n \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments")
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 \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"remarks": "<string>",
"posted_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Adjust inventory stock
Adjust on-hand stock for any given product in a given location. Either the product sku or product_id is required to identify the product.
Up to 3000 entries may be submitted per request. Requests with more than 500 entries are processed asynchronously: the adjustment header is created and returned immediately, while the individual stock changes are applied in the background shortly after.
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"adjustment_entries": [
{
"warehouse_id": 123,
"location_id": 123,
"qty_onhand": 123,
"product_id": 123,
"sku": "<string>",
"lot_id": 123,
"lot_number": "<string>",
"lot_name": "<string>",
"create_lot": true,
"production_date": "2023-12-25",
"expiry_date": "2023-12-25",
"manufacturer_code": "<string>"
}
],
"remarks": "<string>"
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments"
payload = {
"adjustment_entries": [
{
"warehouse_id": 123,
"location_id": 123,
"qty_onhand": 123,
"product_id": 123,
"sku": "<string>",
"lot_id": 123,
"lot_number": "<string>",
"lot_name": "<string>",
"create_lot": True,
"production_date": "2023-12-25",
"expiry_date": "2023-12-25",
"manufacturer_code": "<string>"
}
],
"remarks": "<string>"
}
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({
adjustment_entries: [
{
warehouse_id: 123,
location_id: 123,
qty_onhand: 123,
product_id: 123,
sku: '<string>',
lot_id: 123,
lot_number: '<string>',
lot_name: '<string>',
create_lot: true,
production_date: '2023-12-25',
expiry_date: '2023-12-25',
manufacturer_code: '<string>'
}
],
remarks: '<string>'
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments', 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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments",
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([
'adjustment_entries' => [
[
'warehouse_id' => 123,
'location_id' => 123,
'qty_onhand' => 123,
'product_id' => 123,
'sku' => '<string>',
'lot_id' => 123,
'lot_number' => '<string>',
'lot_name' => '<string>',
'create_lot' => true,
'production_date' => '2023-12-25',
'expiry_date' => '2023-12-25',
'manufacturer_code' => '<string>'
]
],
'remarks' => '<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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments"
payload := strings.NewReader("{\n \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\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://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/adjustments")
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 \"adjustment_entries\": [\n {\n \"warehouse_id\": 123,\n \"location_id\": 123,\n \"qty_onhand\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"lot_id\": 123,\n \"lot_number\": \"<string>\",\n \"lot_name\": \"<string>\",\n \"create_lot\": true,\n \"production_date\": \"2023-12-25\",\n \"expiry_date\": \"2023-12-25\",\n \"manufacturer_code\": \"<string>\"\n }\n ],\n \"remarks\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"remarks": "<string>",
"posted_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Body
One entry per stock adjustment. A maximum of 3000 entries may be submitted in a single request (exceeding this returns a 422). Payloads larger than 500 entries are posted asynchronously in the background: the response returns the created adjustment header immediately, but the individual stock changes finish posting shortly afterward rather than within the request.
3000Show child attributes
Show child attributes
Optional remarks for the adjustment
Response
Successful response