BOM lines
Query BOM lines
POST
/
bom-line
/
query
Query BOM lines
curl --request POST \
--url https://{instance}/api/v2/bom-line/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"filter": "<string>",
"search": "<string>",
"page": 1,
"pageSize": 100,
"orderBy": "<string>",
"select": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: '<string>',
search: '<string>',
page: 1,
pageSize: 100,
orderBy: '<string>',
select: ['<string>']
})
};
fetch('https://{instance}/api/v2/bom-line/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/bom-line/query"
payload = {
"filter": "<string>",
"search": "<string>",
"page": 1,
"pageSize": 100,
"orderBy": "<string>",
"select": ["<string>"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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": {}
}
],
"hasMore": true
}{
"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.
Body
application/json
The same options the list endpoint takes in the query string. Any additional key is read as a field filter.
AND/OR filter expression.
Full-text search term.
Page to return, starting at 1.
Records per page. Defaults to 100 when omitted.
Sort as field:asc or field:desc.
Return only these fields.
Field name.
⌘I
Query BOM lines
curl --request POST \
--url https://{instance}/api/v2/bom-line/query \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"filter": "<string>",
"search": "<string>",
"page": 1,
"pageSize": 100,
"orderBy": "<string>",
"select": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: '<string>',
search: '<string>',
page: 1,
pageSize: 100,
orderBy: '<string>',
select: ['<string>']
})
};
fetch('https://{instance}/api/v2/bom-line/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/bom-line/query"
payload = {
"filter": "<string>",
"search": "<string>",
"page": 1,
"pageSize": 100,
"orderBy": "<string>",
"select": ["<string>"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(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": {}
}
],
"hasMore": true
}{
"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": {}
}