List where a part is used
const url = 'https://app.buildtrace.eu/api/parts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/where-used';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.buildtrace.eu/api/parts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/where-used \ --header 'Authorization: Bearer <token>'Every assembly revision whose effective BOM uses the part, directly (a BOM line, or an ADD or REPLACE of an ECO in force for that revision) or through sub-assemblies, up to a depth limit, and the open build orders (DRAFT, RESERVED, IN_PRODUCTION) with a line consuming it. An ECO in force that removes or replaces the part takes that use away. Filtered to one revision, pinned uses must pin it and floating uses must resolve to it (it is the latest released revision). The answer is cut to what the caller may read: buildOrders is empty unless the caller may read production (production:read), and ecoId/ecoNumber are omitted unless it may read ECOs (ecos:read).
Required scope: bom:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Only uses of this revision of the part.
Responses
Section titled “Responses”OK
object
The revision filter, when one was given.
Assembly revisions whose own effective BOM uses the part (depth 1).
object
ACTIVE, DEPRECATED or OBSOLETE.
DRAFT or RELEASED.
How many of the part one unit of this assembly takes in this entry: the line quantity for a direct use; for an indirect one, the sum over every sub-assembly path of the product of the quantities along it.
Everything one unit of the assembly takes, direct and through sub-assemblies.
How this assembly references its child: the direct line’s, or the first path’s for an indirect use. Pinned to a revision, or floating (the latest released revision).
The revision of the part that is used: pinned, or what a floating line resolves to (for an indirect use, at the bottom of the first path). A floating line onto a part with no released revision uses nothing, as in the effective BOM, and is not listed.
Set when this assembly’s line (the direct one, or the first path’s) was placed by an ECO in force (ADD or REPLACE) and the caller may read ECOs (ecos:read).
1 for a direct use; 2 and up through sub-assemblies.
The first (shortest) path: the assemblies from the direct user up to and including this one.
object
Up to 10 of the paths, shortest first, each with its own quantity.
object
object
Quantity of the part per unit of the assembly along this path.
How the assembly at the top of the path references its child on it.
The ECO in force that placed the top line, when the caller may read ECOs.
How many paths there are in all (quantity sums every one).
Nothing uses this assembly revision in turn.
Two or more ECOs in force on this assembly revision remove or replace the same part (its effective BOM can’t be resolved until that is settled); the use shown follows the last.
Assembly revisions that contain the part through sub-assemblies (depth 2 and up), each listed once with every path summed. An assembly that also uses the part directly is in both lists.
object
ACTIVE, DEPRECATED or OBSOLETE.
DRAFT or RELEASED.
How many of the part one unit of this assembly takes in this entry: the line quantity for a direct use; for an indirect one, the sum over every sub-assembly path of the product of the quantities along it.
Everything one unit of the assembly takes, direct and through sub-assemblies.
How this assembly references its child: the direct line’s, or the first path’s for an indirect use. Pinned to a revision, or floating (the latest released revision).
The revision of the part that is used: pinned, or what a floating line resolves to (for an indirect use, at the bottom of the first path). A floating line onto a part with no released revision uses nothing, as in the effective BOM, and is not listed.
Set when this assembly’s line (the direct one, or the first path’s) was placed by an ECO in force (ADD or REPLACE) and the caller may read ECOs (ecos:read).
1 for a direct use; 2 and up through sub-assemblies.
The first (shortest) path: the assemblies from the direct user up to and including this one.
object
Up to 10 of the paths, shortest first, each with its own quantity.
object
object
Quantity of the part per unit of the assembly along this path.
How the assembly at the top of the path references its child on it.
The ECO in force that placed the top line, when the caller may read ECOs.
How many paths there are in all (quantity sums every one).
Nothing uses this assembly revision in turn.
Two or more ECOs in force on this assembly revision remove or replace the same part (its effective BOM can’t be resolved until that is settled); the use shown follows the last.
Lines of open build orders (DRAFT, RESERVED, IN_PRODUCTION) that consume the part. Empty unless the caller may read production (production:read).
object
How many levels up the search goes.
True when assemblies sit above the depth limit and were not followed.
True when floating lines form a loop above the part (A follows B, B follows A); the loop was cut rather than followed, so quantities through it are not counted.
Example
{ "direct": [ { "refMode": "PINNED", "paths": [ { "refMode": "PINNED" } ] } ], "indirect": [ { "refMode": "PINNED", "paths": [ { "refMode": "PINNED" } ] } ]}Unauthorized
The part, or the revision of it, is not found