Create a draft assembly order
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rfq_id": 1201,
"bom_id": 88,
"warehouse_id": 3,
"quantity": 50
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders"
payload = {
"rfq_id": 1201,
"bom_id": 88,
"warehouse_id": 3,
"quantity": 50
}
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({rfq_id: 1201, bom_id: 88, warehouse_id: 3, quantity: 50})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders', 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/assembly-orders",
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([
'rfq_id' => 1201,
'bom_id' => 88,
'warehouse_id' => 3,
'quantity' => 50
]),
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/assembly-orders"
payload := strings.NewReader("{\n \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\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/assembly-orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders")
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 \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"status": "draft",
"planned_quantity": 123,
"actual_quantity": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"bom_id": 123,
"rfq_id": 123,
"warehouse_id": 123,
"product_name": "<string>",
"sku": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Work Order Materials & Orders
Create a draft assembly order
Create a Draft assembly order from a finished SKU and one of its BOMs, the same way Inventory > Assembly Orders > Create Assembly Order does. No work order is needed.
The component lines are built server-side from the BOM for the requested quantity, picking stocked bins in the warehouse’s group (Auto Split). A draft moves no stock; complete it in the app.
The request is refused with 422 in the same cases the screen refuses it:
- a lot-tracked finished SKU with no
lot_id(when the tenant requires finished-goods lots) - a
lot_idthat belongs to another SKU - a BOM that is not attached to the SKU
- a
location_idoutside the warehouse - a
warehouse_group_idthat does not contain the warehouse - a
uom_idthat is not one of the SKU’s units - a component with no bin (or no lot, when lot-tracked) in the warehouse
Low component stock is not refused; the screen only warns about it.
POST
/
assembly-orders
Create a draft assembly order
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rfq_id": 1201,
"bom_id": 88,
"warehouse_id": 3,
"quantity": 50
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders"
payload = {
"rfq_id": 1201,
"bom_id": 88,
"warehouse_id": 3,
"quantity": 50
}
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({rfq_id: 1201, bom_id: 88, warehouse_id: 3, quantity: 50})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders', 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/assembly-orders",
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([
'rfq_id' => 1201,
'bom_id' => 88,
'warehouse_id' => 3,
'quantity' => 50
]),
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/assembly-orders"
payload := strings.NewReader("{\n \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\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/assembly-orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/assembly-orders")
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 \"rfq_id\": 1201,\n \"bom_id\": 88,\n \"warehouse_id\": 3,\n \"quantity\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"status": "draft",
"planned_quantity": 123,
"actual_quantity": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"bom_id": 123,
"rfq_id": 123,
"warehouse_id": 123,
"product_name": "<string>",
"sku": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json