curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines"
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/production-batches/{batchId}/billable-lines', 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/production-batches/{batchId}/billable-lines",
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/production-batches/{batchId}/billable-lines"
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/production-batches/{batchId}/billable-lines")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines")
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": [
{
"id": 123,
"line_type": "product",
"assembly_order_id": 123,
"assembly_order_line_id": 123,
"assembly_order_extra_cost_id": 123,
"rfq_id": 123,
"sku": "<string>",
"product_name": "<string>",
"description": "<string>",
"planned_qty": 123,
"actual_qty": 123,
"unit_price": 123,
"line_total": 123,
"already_billed_amount": 123,
"billable_amount": 123,
"uom_name": "<string>"
}
],
"vendor_id": 123,
"production_batch_id": 123,
"production_batch_number": "<string>",
"work_orders": [
{
"id": 123,
"work_order_number": "<string>",
"status": "<string>",
"assembly_order_count": 123
}
],
"assembly_orders": [
{
"id": 123,
"status": "<string>",
"planned_quantity": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Get billable lines for a production batch
Returns the billable lines aggregated from every work order in the production batch (production run), which in turn come from each work order’s linked assembly orders — component lines and extra costs (manufacturing service fees) that still have a remaining billable amount. Use this to pre-fill a bill form when creating a bill from a production run.
Production batches are the top-level entity that groups work orders
(Production Batch → Work Order[] → Assembly Order[]). Each line’s
billable_amount is the line total less any amount already billed through
existing allocations; fully-billed lines are omitted. Assembly orders that
appear under more than one work order are de-duplicated.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines"
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/production-batches/{batchId}/billable-lines', 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/production-batches/{batchId}/billable-lines",
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/production-batches/{batchId}/billable-lines"
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/production-batches/{batchId}/billable-lines")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/production-batches/{batchId}/billable-lines")
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": [
{
"id": 123,
"line_type": "product",
"assembly_order_id": 123,
"assembly_order_line_id": 123,
"assembly_order_extra_cost_id": 123,
"rfq_id": 123,
"sku": "<string>",
"product_name": "<string>",
"description": "<string>",
"planned_qty": 123,
"actual_qty": 123,
"unit_price": 123,
"line_total": 123,
"already_billed_amount": 123,
"billable_amount": 123,
"uom_name": "<string>"
}
],
"vendor_id": 123,
"production_batch_id": 123,
"production_batch_number": "<string>",
"work_orders": [
{
"id": 123,
"work_order_number": "<string>",
"status": "<string>",
"assembly_order_count": 123
}
],
"assembly_orders": [
{
"id": 123,
"status": "<string>",
"planned_quantity": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
Production batch ID
Response
Successful response
Show child attributes
Show child attributes
Vendor associated with the production batch, if any.
The production batch these lines belong to.
Human-readable production batch (run) number.
The work orders contained in this production batch.
Show child attributes
Show child attributes
The assembly orders across all work orders in this batch, de-duplicated by ID.
Show child attributes
Show child attributes