BOM lines
Update matching BOM lines
A filter is required.
PATCH
/
bom-line
/
bulk
Update matching BOM lines
curl --request PATCH \
--url https://{instance}/api/v2/bom-line/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"isArchived": true,
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputPerUnit": 1,
"quantity": 1,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isArchived: true,
name: '<string>',
identifier: '<string>',
itemId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
routeDeliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
orderDeliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
outputPerUnit: 1,
quantity: 1,
quantityActual: 123,
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
poNumber: '<string>',
subOrderRef: '<string>',
sortOrder: 123,
notes: '<string>',
metadata: {}
})
};
fetch('https://{instance}/api/v2/bom-line/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/bom-line/bulk"
payload = {
"isArchived": True,
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputPerUnit": 1,
"quantity": 1,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "ratio",
"scaling": "per_unit",
"outputPerUnit": 123,
"quantity": 123,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"source": "manual",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Query Parameters
Full-text search across the resource's search columns. Append :col1,col2 to limit which columns are searched.
AND/OR filter expression, for example type eq 'phase' and isArchived eq false. Simple equality can also be passed as plain field parameters.
Body
application/json
Available options:
ratio, total Available options:
per_unit, per_order Required range:
x > 0Required range:
x > 0Available options:
manual, import, route_template, adhoc Response
Successful response.
Show child attributes
Show child attributes
⌘I
Update matching BOM lines
curl --request PATCH \
--url https://{instance}/api/v2/bom-line/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"isArchived": true,
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputPerUnit": 1,
"quantity": 1,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isArchived: true,
name: '<string>',
identifier: '<string>',
itemId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
routeDeliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
orderDeliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
outputPerUnit: 1,
quantity: 1,
quantityActual: 123,
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
poNumber: '<string>',
subOrderRef: '<string>',
sortOrder: 123,
notes: '<string>',
metadata: {}
})
};
fetch('https://{instance}/api/v2/bom-line/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/bom-line/bulk"
payload = {
"isArchived": True,
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outputPerUnit": 1,
"quantity": 1,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"identifier": "<string>",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"routeDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderDeliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "ratio",
"scaling": "per_unit",
"outputPerUnit": 123,
"quantity": 123,
"quantityActual": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poNumber": "<string>",
"subOrderRef": "<string>",
"source": "manual",
"sortOrder": 123,
"notes": "<string>",
"metadata": {}
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}