---
title: "Align BOM columns across files with AI"
method: POST
path: "/bom-compare/consolidate-fields"
tags: ["bom"]
---

# Align BOM columns across files with AI

`POST /bom-compare/consolidate-fields`

Groups the column headers of two or more BOM exports (e.g. an E-BOM and its M-BOM) into consolidated fields by meaning, preserving each original header, and identifies which field holds the part identifier. Only column names are sent to the model; no cell values are transmitted.

## Request body

- HandlersConsolidateFieldsRequest
  - `files` ServicesBomConsolidationFile[]
    - `headers` string[]
    - `name` string
    - `role` string

## Response `200`

OK

- ServicesBomFieldConsolidationResult
  - `fields` ServicesBomConsolidatedField[]
    - `canonical_name` string
    - `columns` ServicesBomConsolidatedColumn[]
      - `file_index` integer
      - `header` string
  - `item_type_columns` ServicesBomConsolidatedColumn[]
    - `file_index` integer
    - `header` string
  - `part_identifier` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/resourcly/apis/resourcly-api.md) · [All operations](https://skmtc.net/resourcly/apis/resourcly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/resourcly/resourcly-api/revisions/7f97d8cd0f1e/schema)
