imports.preview

Dry run of a customer CSV import. Writes nothing. Returns the headers, a suggested mapping (from a preset or the header names), and for every row the customer it would create or the problems found. Show the mapping to the owner before imports.run. next_actions says what to do next.

WhoAgents can call this
RESTPOST /v1/imports/preview
MCP toolimports_preview
Writesno
AreaImports, custom fields, tags and search

When to use it

Dry run of a customer CSV import. Writes nothing.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
shop_idstring (uuid)yes
csvstringyes
presetstring (one of jobber, housecall_pro, servicetitan, companycam)no
mappingarrayno
mapping[].columnstringyes
mapping[].fieldstring (one of name, first_name, last_name, is_company, company_name, email, phone, lead_source, tags, notes, external_id, property.line1, property.line2, property.locality, property.region, property.postal_code, property.full_address, billing.line1, billing.line2, billing.locality, billing.region, billing.postal_code, billing.country, skip)yes
sourcestringno
on_matchstring (one of skip, update)no

Example

POST https://doingwork.work/v1/imports/preview
content-type: application/json
Idempotency-Key: 3f1c...

{
  "shop_id": "00000000-0000-4000-8000-000000000000",
  "csv": "..."
}

Output

JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.