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>",
"effective_date": "2023-12-25",
"is_correction": true,
"corrects_id": 2
}
'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>",
"effective_date": "2023-12-25",
"is_correction": True,
"corrects_id": 2
}
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>',
effective_date: '2023-12-25',
is_correction: true,
corrects_id: 2
})
};
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>',
'effective_date' => '2023-12-25',
'is_correction' => true,
'corrects_id' => 2
]),
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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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>",
"effective_date": "2023-12-25",
"is_correction": true,
"corrects_id": 2
}
'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>",
"effective_date": "2023-12-25",
"is_correction": True,
"corrects_id": 2
}
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>',
effective_date: '2023-12-25',
is_correction: true,
corrects_id: 2
})
};
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>',
'effective_date' => '2023-12-25',
'is_correction' => true,
'corrects_id' => 2
]),
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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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 \"effective_date\": \"2023-12-25\",\n \"is_correction\": true,\n \"corrects_id\": 2\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
Optional business date the adjustment posts on. Lets an integration backdate an adjustment (for example, to land it in a prior accounting period) in a single call instead of posting and then correcting. Omit to post on the current date.
Marks this adjustment as a correction of another record. When true, both corrects_type and corrects_id are required — a correction must name the record it corrects. Supplying any of the three correction fields requires the complete set; an incomplete correction reference returns a 422. Defaults to false (a normal, non-correction adjustment).
The kind of record this adjustment corrects. Required when is_correction is true (or when corrects_id is supplied).
adjustment, receiving_report ID of the record (of type corrects_type) this adjustment corrects. Required when is_correction is true (or when corrects_type is supplied).
x >= 1Response
Successful response