> ## Documentation Index
> Fetch the complete documentation index at: https://betterdatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Catalog Field Mapping

> Map source catalog fields to Better Data catalog fields.

## Overview

Use catalog import to register SKU identities before inventory, orders, and forecasting data.
The current endpoint validates `externalId` and optionally accepts `name`.

## Quick Start

1. Build a `products[]` payload with one row per SKU.
2. POST to `/api/import/catalog`.
3. Poll `/api/import/status/[jobId]` until complete.

## Field Reference

| Better Data Field | Type   | Required | Example                | Description                                                | Source System Analog                                        |
| ----------------- | ------ | -------- | ---------------------- | ---------------------------------------------------------- | ----------------------------------------------------------- |
| `externalId`      | string | YES      | `SKU-001`              | Unique SKU key used for idempotent upsert.                 | NetSuite `itemid`, SAP material number, Shopify variant SKU |
| `name`            | string | No       | `Hydration Serum 30ml` | Product display name; defaults to `externalId` if omitted. | NetSuite display name, Shopify title                        |

## Validation Rules

* `products[]` must be present and non-empty.
* Every row must include `externalId`.
* Re-importing the same `externalId` updates existing product metadata.

## Common Errors

| Error                    | Meaning                                                    | How to fix                           |
| ------------------------ | ---------------------------------------------------------- | ------------------------------------ |
| `products[] is required` | Request body omitted `products` array or sent empty array. | Send `{ "products": [ ... ] }`.      |
| `externalId is required` | A row was missing an SKU identifier.                       | Populate `externalId` for every row. |
