curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers', 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/cost-layers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"layer_id": 123,
"received_at": "2024-06-01 14:22:00",
"original_quantity": 123,
"remaining_quantity": 123,
"unit_cost": 123,
"extended_value": 123,
"product_id": 123,
"sku": "<string>",
"warehouse_id": 123,
"is_variance": true
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 10,
"to": 10,
"total": 50
}
}{
"message": "<string>"
}List cost layers
List legacy FIFO/WAC cost layers (rfq_stock_cost_layers) with offset pagination.
Each layer represents a quantity of a product received into a warehouse at a specific
unit cost.
These are legacy cost layers, not Luminous Core inventory-cost ledger rows. For the
Core ledger use GET /core/inventory-costs.
Depleted vs active layers
Empty/depleted layers are included by default. To narrow the result:
- Depleted only:
remaining_quantity[eq]=0 - Active only:
with_remaining_quantity=trueorremaining_quantity[gt]=0
Soft-deleted layers are always excluded. On large tenants, combine with a product_id
or sku filter.
For filter operators and bracket syntax, see the Filter System Documentation.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers', 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/cost-layers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/inventory/cost-layers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"layer_id": 123,
"received_at": "2024-06-01 14:22:00",
"original_quantity": 123,
"remaining_quantity": 123,
"unit_cost": 123,
"extended_value": 123,
"product_id": 123,
"sku": "<string>",
"warehouse_id": 123,
"is_variance": true
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 10,
"to": 10,
"total": 50
}
}{
"message": "<string>"
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Query Parameters
Page number for pagination.
x >= 1Rows per page (max 100).
1 <= x <= 100Filter by product (RFQ) ID. Example product_id[eq]=678.
Filter by product internal SKU. Example sku[eq]=ABC-001.
Filter by warehouse / location ID.
Filter by remaining quantity on the layer. Example remaining_quantity[eq]=0 for depleted layers.
Filter by original (initial) quantity.
Filter by unit cost.
Filter by whether the layer is a variance/adjustment layer.
When true, only returns layers with remaining_quantity > 0.