curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"items": [
{
"product_id": 123,
"quantity": 1,
"sku": "<string>",
"note": "<string>",
"uom_id": 123,
"order": 1
}
],
"extra_costs": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 1
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}"
payload = {
"name": "<string>",
"items": [
{
"product_id": 123,
"quantity": 1,
"sku": "<string>",
"note": "<string>",
"uom_id": 123,
"order": 1
}
],
"extra_costs": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 1
}
]
}
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({
name: '<string>',
items: [
{
product_id: 123,
quantity: 1,
sku: '<string>',
note: '<string>',
uom_id: 123,
order: 1
}
],
extra_costs: [{name: '<string>', quantity: 1, unit_price: 1}]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}', 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/boms/{bomId}",
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([
'name' => '<string>',
'items' => [
[
'product_id' => 123,
'quantity' => 1,
'sku' => '<string>',
'note' => '<string>',
'uom_id' => 123,
'order' => 1
]
],
'extra_costs' => [
[
'name' => '<string>',
'quantity' => 1,
'unit_price' => 1
]
]
]),
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/boms/{bomId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\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/boms/{bomId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}")
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 \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"items": [
{
"id": 123,
"bom_id": 123,
"product_id": 123,
"quantity": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>"
},
"base_quantity": 123,
"note": "<string>",
"uom_id": 123,
"unit_of_measure": {
"id": 123,
"name": "<string>"
},
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"extra_costs": [
{
"id": 123,
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Update a BOM
Update an existing BOM’s information. All fields are optional, allowing partial updates.
When updating items or extra_costs, the provided arrays will replace all existing
items or extra costs respectively.
Each item must specify either a product_id or sku. If a sku is provided,
the system will locate the product by SKU (including alternate SKUs). If no product
is found, an error will be thrown.
If no uom_id is provided for an item, the default unit of measure will be used.
For extra costs, only name, quantity, and unit_price are required. The
line_total will be calculated automatically on the backend. Do not provide
line_total in the request.
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"items": [
{
"product_id": 123,
"quantity": 1,
"sku": "<string>",
"note": "<string>",
"uom_id": 123,
"order": 1
}
],
"extra_costs": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 1
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}"
payload = {
"name": "<string>",
"items": [
{
"product_id": 123,
"quantity": 1,
"sku": "<string>",
"note": "<string>",
"uom_id": 123,
"order": 1
}
],
"extra_costs": [
{
"name": "<string>",
"quantity": 1,
"unit_price": 1
}
]
}
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({
name: '<string>',
items: [
{
product_id: 123,
quantity: 1,
sku: '<string>',
note: '<string>',
uom_id: 123,
order: 1
}
],
extra_costs: [{name: '<string>', quantity: 1, unit_price: 1}]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}', 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/boms/{bomId}",
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([
'name' => '<string>',
'items' => [
[
'product_id' => 123,
'quantity' => 1,
'sku' => '<string>',
'note' => '<string>',
'uom_id' => 123,
'order' => 1
]
],
'extra_costs' => [
[
'name' => '<string>',
'quantity' => 1,
'unit_price' => 1
]
]
]),
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/boms/{bomId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\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/boms/{bomId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/boms/{bomId}")
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 \"name\": \"<string>\",\n \"items\": [\n {\n \"product_id\": 123,\n \"quantity\": 1,\n \"sku\": \"<string>\",\n \"note\": \"<string>\",\n \"uom_id\": 123,\n \"order\": 1\n }\n ],\n \"extra_costs\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"items": [
{
"id": 123,
"bom_id": 123,
"product_id": 123,
"quantity": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>"
},
"base_quantity": 123,
"note": "<string>",
"uom_id": 123,
"unit_of_measure": {
"id": 123,
"name": "<string>"
},
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"extra_costs": [
{
"id": 123,
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
BOM ID
Body
BOM name (must be unique)
255BOM items (components/products). When updating, this will replace all existing items.
1- Option 1
- Option 2
Show child attributes
Show child attributes
Additional costs associated with the BOM. When updating, this will replace all existing extra costs.
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes