# Dealers

Create dealers, keep each dealer's profile current, name its approvers, upload its logo, signatures and photos, and import dealers in bulk. For partners and their agents. Your staff can also do this in the [partner console](console.md#dealers).

## Who owns what

You own each dealer's **profile**: its name, address, phones, hours, links, logo, colors and the rest. You keep it current through the REST API, the MCP tools or a CSV import.

Xcel owns the fields that protect the approval guarantee. You can read them, but a request that sends one is refused with `xcel_managed_field`:

| Xcel-managed field | Why |
| --- | --- |
| Registered approvers | Only these people can approve live spend. You name them and they confirm by email ([Approvers](#approvers)); you cannot write the list. |
| Disclosures (disclaimers) and the lock | Legal text Xcel signs off on. |
| Dealer license number | Regulated text, stored by Xcel. No template or merge field prints it today, so neither your art nor your saved templates need a place for it. If a dealer's state requires it on the piece, Xcel puts it in that dealer's disclosures. |
| `spend_cap_cents` | The monthly ceiling on submitted spend. |
| `ordering_enabled` | The partner's live-ordering switch. |

The names `approvers`, `approver_emails`, `registered_approvers`, `disclaimers`, `disclosures`, `license_number`, `dealer_license_number`, `spend_cap_cents` and `ordering_enabled` are refused anywhere in a profile, and `brand.disclaimers` too.

Dealers your live key or Xcel created are shared by your test and live keys. So a sandbox key cannot change them: its writes to those dealers only validate (see [Test keys only validate](#test-keys-only-validate)). Make those changes with your live key, or in the [partner console](console.md) in live mode. A dealer your test key creates is a [test dealer](#test-dealers): it is the sandbox's own, and changes to it save.

## Test dealers

A dealer you create with a test (`xm_test_`) key is a test dealer, so you can try your own stores before you go live.

- It is real: it has profile versions, logos, webhooks and sandbox campaigns like any dealer, and its writes save. Every answer shows `"test_only": true`.
- It exists in test mode only. Your live key never sees it: list, get, campaigns and previews answer as for an unknown dealer (404).
- It is never live-ready. It never gets an approver or an UpDash link, and live orders cannot name it.
- Your test keys may create 25. One more is refused with 409 `test_dealer_limit_reached`. Use one you have, or Demo Motors (`demo-motors`), or ask Xcel to delete ones you no longer need.
- Its `external_id` is apart from your live dealers'. When you go live, create the real dealer with your live key and the same `external_id`. From then on that id names the real dealer in both modes; the test dealer stays reachable by its Xcel id.
- Its `dealer.updated` events go to your test endpoints only.
- It is deleted with your sandbox partner. There is no reset.

## Test keys only validate

A test key's write to a shared dealer (one your live key or Xcel created) runs every check a live key's write runs, and answers with what would be stored. It writes nothing: no profile version, no logo file, no `dealer.updated` webhook and no UpDash push. This covers `PUT` and `PATCH /v1/dealers/{id}/profile`, `POST /v1/dealers/{id}/logo`, `POST`, `PATCH` and `DELETE` on `/v1/dealers/{id}/assets`, the rows of `POST /v1/dealers/import` for shared dealers, `POST /v1/dealers/{id}/approvers` (no email is sent), and the MCP tools `upsert_dealer`, `update_dealer_profile`, `upload_dealer_logo`, `upload_dealer_asset` and `delete_dealer_asset`.

| You see | Means |
| --- | --- |
| `"validated_only": true` in the body | Nothing was saved. Live writes answer `"validated_only": false`. |
| The header `X-Xcel-Validated-Only: true` | The same, for REST. |
| `note` | What happened and how to save the change. |
| `version` and the `ETag` | The version that is still current. Use it as `If-Match` when you send the change with your live key. |
| `would_be_version` | The version a live key's write would create (the same as `version` when nothing would change). |
| `changed`, `changed_fields` | What a live key's write would change. |
| `profile` | The profile as it would be stored. |

- The CSV import with a test key creates test dealers for new `external_id`s and saves rows for your test dealers. Each row for a shared dealer has `"validated_only": true`, and so does the top of the answer when any row has it.
- MCP `upsert_dealer` with a test key creates a test dealer, or updates one; for a shared dealer it only validates.
- Errors are the same as for a live key: 400 `invalid_profile`, `xcel_managed_field`, 412 `version_conflict`, the logo errors and the rest.
- Reads with a test key (list, get, profile, versions, brand) see the shared dealers and your test dealers.

## Create a dealer

`POST /v1/dealers` (MCP: `upsert_dealer`) with your own id and a profile. In the [partner console](console.md#add-dealers), **Add dealers** does the same from a form or a spreadsheet:

```bash
curl -s -X POST "$API/v1/dealers" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{
    "external_id": "dlr-1042",
    "profile": {
      "name": "Lakeside Ford",
      "address": { "line1": "1 Lake Rd", "city": "Boston", "state": "MA", "zip": "02134" },
      "phones": { "main": "6175550100" },
      "links": { "website": "https://lakeside.example.com" },
      "time_zone": "America/New_York"
    }
  }'
```

The answer is 201 with the dealer, its profile at version 1, `"validated_only": false` and an `ETag: "1"` header. With a test key it creates a [test dealer](#test-dealers).

- `external_id` is 1 to 100 printable characters and unique among your dealers (test dealers apart). Anywhere a request takes a dealer id, your `external_id` works too. Another dealer with the same `external_id` answers 409 `external_id_taken`.
- `name` and `address` are required. Everything else is optional.
- A new dealer has no registered approver, so `live_ready` is `false`.

### Live orders wait for an approver

You can create campaigns for a new dealer, render proofs and get quotes in both test and live mode. Sandbox orders go all the way through.

Live approval needs a registered approver for the dealer. Until then, a live `request_approval` and a live submit are refused with 409 `no_registered_approver`. Name the approver ([Approvers](#approvers)). When `live_ready` turns `true`, request approval again.

## Approvers

A person at the dealership approves every live order, on a review page Xcel emails them. You name that person; they confirm by email.

`POST /v1/dealers/{id}/approvers` (MCP: `upsert_dealer` with `approver`; console: the dealer's Approvers card):

```bash
curl -s -X POST "$API/v1/dealers/dlr-1042/approvers" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{ "email": "gm@lakeside.example.com", "name": "Jo Rivera" }'
```

The answer is 201 with the `invitation` (its address masked), `domain_match` and a `next_step`. Xcel emails the person a confirm link. The email names the dealer and your company and holds the link, and no order. The link works once, for 7 days; Xcel stores only its hash.

**A new account's invitations wait for Xcel.** Until Xcel has sent your Order Form or turned on live ordering ([Going live](going-live.md), steps 7a and 8), the invitation is saved with `email_held: true` and nothing is emailed. Xcel sends it within minutes of either, and its 7 days start then. So a new account cannot send mail from UpDash to an address it names.

When they press Confirm:

- An address at the dealer's website domain (`links.website` in its profile) is registered at once. Domains compare as registered names, so `www.lakeside.example.com`, `lakeside.example.com` and `mail.lakeside.example.com` match. If the website moved from another domain in the last 30 days, the address waits for Xcel instead, and `domain_match` says `false`. A dealer's first website counts as settled.
- So is an address at a dealer-group domain Xcel listed for you (ask Xcel to add your groups' domains).
- Any other address, and any address at a common free mail service, waits while Xcel checks it with the dealership. Xcel registers it or declines it.

`GET /v1/dealers/{id}/approvers` lists the registered approvers (masked) and the people you named, newest first. `GET /v1/dealers/{id}` and the profile show the same invitations as `approver_invitations`.

| `status` | Means |
| --- | --- |
| `pending_confirmation` | We emailed the link (or, with `email_held`, will once Xcel vouches for your account); they have not confirmed. |
| `pending_xcel_review` | They confirmed; Xcel is checking the address. |
| `registered` | They approve live orders. `decided_by` is `website_domain`, `group_domain` or `ops` (Xcel). |
| `declined` | Xcel did not register the address. |
| `expired` | The 7 days passed, or you named the same address again (a new link replaces the old one). |

Every change of status sends `dealer.updated` with `changed_fields: ["approvers"]` and `approver_invitation: {id, status}` ([Webhooks](webhooks.md#dealerupdated)).

| Limit | Error |
| --- | --- |
| The address is already registered | 409 `approver_already_registered` |
| It confirmed and Xcel is checking it | 409 `approver_pending_review` |
| Three invitations of the dealer are waiting (to confirm or for Xcel) | 409 `approver_invitations_pending_limit` |
| Five approver emails for the dealer in one UTC day, repeats included | 429 `approver_invite_rate_limited` |
| The email could not be sent (the invitation is withdrawn) | 502 `approver_email_failed` |

- With a test key it only validates: nobody is emailed and nothing is stored (`"validated_only": true`). A test dealer never gets an approver, but `domain_match` answers as it would on a live dealer with the same website, so you can try addresses in the sandbox.
- The emails come from UpDash and name your company and the dealer, so tell the person to expect them. No timing is promised for Xcel's review of an address off the dealer's domain; `dealer.updated` says when it is done.
- To remove an approver, ask Xcel.

## Read dealers

| Call | Returns |
| --- | --- |
| `GET /v1/dealers?limit=50&after=<id>` (MCP `list_dealers`) | A page of your dealers, oldest first. Pass `next_after` as `after` for the next page. `limit` is 1 to 200. Find a dealer with `query` (name or external id contains, ignoring case) and `dealer_group` (the whole value of the profile's `dealer_group`, ignoring case); send them on every page. `total` counts every match. MCP's tool list shows `limit` and `after`. |
| `GET /v1/dealers/{id}` | One dealer. `{id}` is Xcel's id or your `external_id`. |
| `GET /v1/dealers/{id}/profile` (MCP `get_dealer_profile`) | The current profile. Add `?version=3` for an older one. |
| `GET /v1/dealers/{id}/profile/versions` | Who changed which fields and when, newest first. Page with `before` = `next_before`. |
| `GET /v1/dealers/{id}/brand` (MCP `get_dealer_brand`) | What a new creative prints: name, address, logo, colors, phone, disclosures. |
| `GET /v1/dealers/{id}/assets` (MCP `list_dealer_assets`) | The dealer's signatures and photos ([Creative assets](#creative-assets)). |

A dealer created while you walk the list lands on a later page, because pages run from the oldest dealer (`created_at`, then `id`). `next_after` is still a dealer id, so a cursor you saved earlier keeps working and goes on from that dealer's place in this order.

Each dealer in a list shows `id`, `test_only`, `external_id`, `name`, `address`, `spend_cap_cents`, `registered_approvers` (masked), `profile_version`, `live_ready`, `updash_linked`, `created_by` and the times. `GET /v1/dealers/{id}` adds `approver_invitations`. A dealer whose `external_id` is `import` can be read only by its Xcel id, because `/v1/dealers/import` is the import endpoint.

The profile response has:

| Key | Meaning |
| --- | --- |
| `version`, `etag` | The version number, and the same as an ETag (`"3"`). |
| `current` | `false` when you asked for an older version. |
| `updated_at`, `updated_by` | When the version was written, and who: `{type, id}` with type `api_key`, `oauth_client`, `console_user` (a person in the [partner console](console.md)), `xcel_admin` or `updash_seed`. |
| `profile` | The fields you own (below). Every key is present; unset ones are `null` or empty. You can send it back with PUT unchanged. |
| `logos` | `primary` and `reversed`: the uploaded file's format, size, pixel size and sha256, or `null`. |
| `assets` | The dealer's [creative assets](#creative-assets) in this version. |
| `test_only` | `true` for a [test dealer](#test-dealers). |
| `xcel_managed` | `registered_approvers` (masked), `disclaimers`, `license_number`, `spend_cap_cents`, `ordering_enabled`. Read-only. |
| `approver_invitations` | The people you named as approvers, newest first, with their `status` ([Approvers](#approvers)). |
| `live_ready`, `live_ready_note` | Whether live approval can happen, and what to do if not. |
| `updash_linked` | Whether Xcel linked the dealer to UpDash, so changes are pushed there. |

## The profile

| Field | Rules |
| --- | --- |
| `name` | Required. 1 to 200 characters. Printed on the mail. |
| `legal_name`, `dealer_group` | 1 to 200 characters. |
| `alias` | A short name for scripts and agents. 1 to 60 characters. |
| `pronunciation` | How to say the name, for voice agents. 1 to 200 characters. |
| `oem_dealer_codes` | Up to 20 `{make, code}` pairs. |
| `makes` | Franchise makes, up to 30, no repeats. `[]` means used vehicles only; `null` means not stated. `{{dealer.make_logos}}` prints their logos ([Make logos](creative.md#make-logos)); with none, it prints nothing and preflight warns `make_logo_missing`. A make logo prints only for these makes, and preflight checks the creative against their [manufacturer rules](creative.md#manufacturer-rules). |
| `address` | Required. `line1`, optional `line2`, `city`, `state` (two-letter code), `zip` (`12345` or `12345-6789`). Printed on the mail. |
| `return_address` | Same shape as `address`, or `null`. |
| `service_area_zips` | Up to 1,000 five-digit ZIP codes. |
| `phones` | `main`, `sales`, `service`, `parts`. Each a 10-digit US number. Punctuation, spaces and a leading `+1` are removed, so `(617) 555-0100` is stored as `6175550100`. `main` prints when a campaign sends no tracked `cta_phone`. |
| `contact` | `name`, `title`, `email`. A template preview for this dealer prints `name` and `title` as the signer. |
| `notification_emails` | `campaign` and `service` lists, up to 10 emails each. `[]` means nobody; `null` means not stated. |
| `time_zone` | An IANA name, for example `America/Chicago`. |
| `hours` | `sales`, `service` and `parts`, each `{mon, tue, wed, thu, fri, sat, sun}` with up to four `["HH:MM", "HH:MM"]` intervals a day, 24-hour, in order, not overlapping. A close of `24:00` is allowed. An empty day is closed. `{{dealer.hours}}` prints `sales` and `{{dealer.service_hours}}` prints `service`, one line per run of days (`Mon-Fri 9am-8pm`). |
| `hours_exceptions` | Up to 100 `{date, department, closed: true}` or `{date, department, intervals: [...]}`. `department` is `sales`, `service`, `parts` or `all`. One per date and department. |
| `links` | `website`, `new_inventory`, `used_inventory`, `service_scheduler`, `credit_app`, `trade_in`. Each an `https://` URL. `{{dealer.website}}` prints `website` as a bare host (`https://lakeside.example.com` prints `lakeside.example.com`). Approver domain matching reads `website`, so a [key limited to some dealers](partners.md#keys-for-one-dealer) cannot change it. |
| `brand` | `colors`: `primary`, `secondary`, `accent`, each `#RRGGBB`. |
| `lead_routing` | `crm_provider`, `adf_emails` (up to 10), `webhook_url` (`https://`). Stored and shown only. Xcel never sends it anywhere, so a change here cannot redirect a dealer's leads. |
| `calls` | What phone number the dealer's mail prints ([Calls](concepts.md#calls)): `print` (`tracking`, the default; `store`; or `own`), `own_number` (needed with `own`), `ring` and `service_ring` (the line a tracking number rings, and the one service mail rings: `main`, `sales`, `service`, `parts` or ten digits; null rings the line the design prints). |

Any other field is refused with 400 `invalid_profile`, which names it in `field`.

## Change the profile

| Call | Does |
| --- | --- |
| `PUT /v1/dealers/{id}/profile` | Replaces the whole profile. Fields you leave out are cleared. Logos, creative assets and the Xcel-managed fields are kept. |
| `PATCH /v1/dealers/{id}/profile` (MCP `update_dealer_profile`) | Merges your changes (JSON merge patch, RFC 7396): objects merge key by key, `null` clears a field, lists replace the old list. |

```bash
curl -s -X PATCH "$API/v1/dealers/dlr-1042/profile" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H 'If-Match: "1"' \
  -d '{ "phones": { "service": "6175550199" }, "hours": { "service": { "sat": [["08:00", "12:00"]] } } }'
```

The answer is the new profile with `changed: true`, `changed_fields` (for example `["phones.service", "hours.service"]`), `validated_only: false` and the new `ETag`. With a test key nothing is saved: see [Test keys only validate](#test-keys-only-validate).

- Every change writes a new, numbered version. Old versions never change.
- A request that changes nothing writes nothing and answers `changed: false`.
- `name` and `address` cannot be cleared.

### Versions and If-Match

Send the version you read as `If-Match` (`"3"`, `W/"3"` or `3`). If the profile changed since, the write is refused with 412 `version_conflict`. Read the profile again, apply your change to it and retry. MCP `update_dealer_profile` takes the same number as `expected_version`, and requires it.

Without `If-Match` (or with `If-Match: *`) the write applies to whatever version is current. If two writes race, the server applies yours on top of the other one.

## Logos

`POST /v1/dealers/{id}/logo` (MCP `upload_dealer_logo`) sets the `primary` logo (printed on the mail) or the `reversed` one (for dark backgrounds). Send the file itself:

```bash
curl -s -X POST "$API/v1/dealers/dlr-1042/logo?variant=primary" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: image/png" --data-binary @logo.png
```

or JSON: `{"variant": "primary", "content_base64": "..."}`, or `{"variant": "primary", "url": "https://..."}` for Xcel to fetch.

| Rule | Error |
| --- | --- |
| PNG, JPEG or SVG, judged by the file's content, not its name or type | 415 `logo_unsupported_type` |
| At most 3 MB | 413 `payload_too_large` on a file sent as the body, 413 `logo_too_large` on a `url` or `content_base64` |
| A PNG or JPEG at least 600 px on its long side and 100 px on its short side, at most 10,000 px a side | 422 `logo_too_small`, `logo_invalid` |
| Still, not animated (no APNG, no SVG animation) | 422 `logo_animated` |
| A URL: `https`, a public host, no redirects, answers within 8 seconds | 422 `logo_url_unreachable` |

- An SVG is rebuilt from allowed parts before anything else reads it: scripts, event handlers, `foreignObject`, links, external references and CSS imports are removed, and `warnings` says what went. Xcel then draws it to a PNG 1,500 px on its long side.
- An SVG with live text (`<text>`) is refused with 422 `logo_svg_live_text`: the server has no fonts for it, so it would print as empty boxes. Convert the text to outlines in your design tool, or upload a PNG.
- Every logo is stored with a PNG rendition. Proofs and print files use only the PNG, inline. A browser never renders your SVG.
- A PDF logo is refused with 415 `logo_pdf_unsupported`: the server has no PDF rasterizer. Export the logo as SVG or PNG instead.
- An upload writes a new profile version that names the file (`changed_fields: ["logos.primary"]`). The same file again changes nothing. `If-Match` works as for PATCH.
- `{{brand.logo}}` prints the `primary` logo, and the `reversed` one where it sits on a dark background or is asked for in white, as the console's designer does for a logo toned white ([Light and dark backgrounds](creative.md#light-and-dark-backgrounds)). Without a reversed logo the primary prints there too: as uploaded on a dark background, with every mark white where white is asked for. Preflight warns `brand_logo_reversed_missing`.

## Creative assets

A dealer can keep the signatures and photos its mail prints, so your HTML never has to carry them as `data:` URLs. Add them with `POST /v1/dealers/{id}/assets` (MCP `upload_dealer_asset`) or in the [partner console](console.md#dealers). A photo for all your dealers goes in your [asset library](#asset-library) once instead.

Upload only what the dealership owns or has permission to use: no manufacturer-restricted art, and no photos of people without their permission.

| `kind` | What it is | It needs |
| --- | --- | --- |
| `signature` | A person's signature. | `name`, or the profile's `contact.name` when you leave it out; `title` is optional. `department` is optional: `sales` or `service`, the mail it signs. |
| `store_photo` | The building or lot. Xcel's templates print the newest one where a vehicle photo has none to show. | Nothing more. `label` is optional. A `name` or `title` is ignored. |
| `staff_photo` | A person. | `name`; `title` is optional. |
| `photo` | Any other image the dealer owns. | `label`. A `name` or `title` is ignored. |

Send the file itself:

```bash
curl -s -X POST "$API/v1/dealers/dlr-1042/assets?kind=signature&name=Jo%20Rivera&title=General%20Manager" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: image/png" --data-binary @signature.png
```

or JSON: `{"kind": "photo", "label": "service drive", "content_base64": "..."}`, or `{"kind": "store_photo", "url": "https://..."}` for Xcel to fetch. The answer is 201 for a new asset and 200 otherwise, with the whole profile, `changed`, `created`, `warnings` and the `asset`:

```json
{
  "id": "6f1c2b9e-3d4a-4f7e-9b1c-0a2d4e6f8a10",
  "kind": "signature",
  "label": "jo_rivera",
  "name": "Jo Rivera",
  "title": "General Manager",
  "merge_field": "{{asset.signature.jo_rivera}}",
  "source": "upload",
  "format": "png",
  "content_type": "image/png",
  "bytes": 33580,
  "sha256": "...",
  "width_px": 1200,
  "height_px": 400,
  "rendition": { "content_type": "image/png", "bytes": 31109, "sha256": "...", "width_px": 1112, "height_px": 316 },
  "print": { "usual_width_in": 1.75, "usual_height_in": 0.5, "dpi_at_usual_size": 632, "sharp_up_to_in": 3.7, "warning": null },
  "uploaded_at": "2026-11-05T04:11:02.000Z"
}
```

| Rule | Error |
| --- | --- |
| PNG or JPEG, judged by the file's content, not its name or type. SVG for a signature only. An iPhone HEIC photo must be exported as JPEG first. | 415 `asset_unsupported_type` |
| At most 10 MB. The hosted API refuses any request body over 4.5 MB first (413 `payload_too_large`), so send a larger file by `url`; the console shrinks a large photo for you. | 413 `asset_too_large` |
| At least 100 px on the long side, at most 10,000 px a side and 64 megapixels | 422 `asset_too_small`, `asset_invalid` |
| Still, not animated | 422 `asset_animated` |
| A URL: `https`, a public host, no redirects, answers within 8 seconds | 422 `asset_url_unreachable` |
| A signature or staff photo has a person's name | 400 `asset_name_required` |
| A photo has a label with letters or digits | 400 `asset_label_required`, `asset_label_invalid` |
| At most 40 assets a dealer. A delete frees a place; replacing one needs none. | 409 `asset_limit_reached` |

- **Labels.** A `label` is turned into lower-case letters, digits and underscores (`service drive` becomes `service_drive`). A signature or staff photo takes its label from the name. A store photo with none is `main`, then `photo_2`, `photo_3`.
- **Replace.** The same `kind` and `label` with another file replaces the file and keeps the `id`. The same file and details again change nothing (`changed: false`).
- **Print size.** A file too small to print sharply is accepted, and `warnings` and `print.warning` say so in plain words, with the width it does print sharply at. The check is 300 dots per inch at the size the kind usually prints: a signature in a box 2 by 0.5 inches, a staff photo 1.5 by 2, a store photo or other photo 4 by 3. A creative that sets a width in its CSS is checked at that width ([Your own HTML](creative.md#your-own-html)).
- **What prints.** Xcel keeps your file privately and prints a rendition of it: upright (a phone's rotation applied), in sRGB, at most 2,400 px on its long side (1,500 for a signature), with no metadata, so a photo's location never reaches a printer. Proofs and print files use the rendition, inline. A browser never renders your SVG: it is rebuilt from allowed parts as a logo is, and `warnings` says what went.
- **Signatures.** A transparent PNG keeps its transparency. On white or near-white paper the paper is removed, so it prints cleanly on any fill and the ink stays its color. Either way it is cropped to the ink. On a dark or colored background it stays as it is and `warnings` says it will print as a box; a very light signature gets a warning too, and a blank one is refused.

`GET /v1/dealers/{id}/assets` lists them (`?kind=` narrows), and `GET .../assets/{asset_id}` reads one. `PATCH .../assets/{asset_id}` changes `label`, `name`, `title` or a signature's `department` (`null` makes it sign both); another asset of the kind with that label is 409 `asset_label_taken`. `DELETE .../assets/{asset_id}` removes one. An `asset_id` the dealer does not have is 404 `asset_not_found`.

- Every write that changes something makes a new profile version (`changed_fields: ["assets"]`) and sends `dealer.updated`, with `If-Match` and validate-only test keys as for any profile write. Assets are not sent to UpDash.
- A delete is soft: new creatives can no longer print the asset. Earlier profile versions and the stored files stay, so a creative made with it keeps what it printed.
- Assets are not fields of the profile: a `PUT` or `PATCH` keeps them, and one that sends `assets` is refused with 400 `invalid_profile`.

Print one in your HTML with `{{asset.signature}}`, `{{asset.store_photo}}`, `{{asset.staff_photo}}`, `{{asset.photo}}` or an asset's `merge_field` ([Asset fields](creative.md#asset-fields)). A built-in template signs with the dealer's signature on its own ([Signatures in templates](creative.md#signatures-in-templates)).

### Slots

Xcel's templates print a dealer's images in named places, its slots. `GET /v1/dealers/{id}/assets` (MCP `list_dealer_assets`) lists every slot, whatever `kind` narrows the assets to. Each slot has these fields:

- `asset_id`: the dealer's own asset that fills it, or null.
- `library_asset_id`: the photo of your [asset library](#asset-library) that fills it when the dealer has nothing of its own there, or null. Only a slot with a `label` takes one.
- `filled_by`: `dealer`, `library` or null.
- `upload_as`: the `kind` and `label` to upload under to fill it. A null `label` means any asset of the kind fills it, and the newest prints.
- `merge_field`: what prints it in your own HTML.
- `used_by`: the templates that print it. Each says where it prints (`prints`) and what it prints when the dealer has nothing there (`without_it`).

A template never leaves an empty box, so a missing slot never blocks an order. It only means the piece prints something more generic.

| `key` | Upload as | Printed by |
| --- | --- | --- |
| `storefront` | `store_photo`; the newest prints | Your Vehicle Is in Demand, Your Lease Is Almost Up, Still Looking for Your Next Vehicle?, Discover a Better Dealership Experience |
| `service_drive` | `photo`, label `service_drive` | We Missed You, Your Vehicle Deserves Attention |
| `vehicle_scene` | `photo`, label `vehicle_scene` | Your Vehicle Is in Demand: each owner's own vehicle is set on it ([A scene behind the vehicle](#a-scene-behind-the-vehicle)) |
| `signature` | `signature`; the newest sets who signs | Every template that signs the signer's name in a handwriting font |
| `showroom` | `photo`, label `showroom` | No Xcel template yet; your own HTML can |
| `team` | `photo`, label `team` | No Xcel template yet; your own HTML can |

### A scene behind the vehicle

Your Vehicle Is in Demand (from version 4) sets each owner's own vehicle on a scene when the dealer, or your [asset library](#asset-library), has a photo labelled `vehicle_scene`: an open road, a season or a plain backdrop. The vehicle is its real photo, cut out of its transparent background and stood on the scene with a soft shadow under the wheels. The scene is cropped to fill a 4.27 x 2.4 in card, so use a landscape photo with open ground in front and nothing in the middle. The console's **Make a photo with AI** makes one ([Asset library](console.md#asset-library)). The proof and the printer's file show the same picture. Without the photo the vehicle prints on the piece itself, with no box around it, and the asset checklist does not count the slot.

**Who signs.** Xcel's service templates sign with the dealer's newest signature marked `department: "service"`, and the other templates with its newest marked `"sales"`. With none marked for a mail, the newest unmarked signature signs it, and with none of those, the profile's `contact`. A signature marked for one mail never signs the other. Leave `department` out, as before, and the newest signature signs everything. `{{asset.signature}}` and `{{dealer.signer_name}}` in your own HTML print the sales signer, so the signature and the name under it are one person.

In the [partner console](console.md#dealers), a dealer's page shows each slot with its upload, each person with which mail they sign, and **Asset checklist** on the Dealers page shows every dealer against the logo, the brand color and each slot a template prints. A slot your library fills reads "From your library".

## Asset library

Your asset library holds photos you upload once and print for any of your dealers: a service photo of your own, a seasonal banner, a team photo for stores without one. `{{asset.photo.<label>}}` prints the dealer's own photo with that label first, and else the library's. So a library photo labelled `service_drive` fills the service drive slot of every dealer that has no service drive photo of its own ([Slots](#slots)).

`POST /v1/assets` (MCP `upload_partner_asset`) adds one, as the file itself or as JSON:

```bash
curl -s -X POST "$API/v1/assets?name=Service%20drive%20at%20dusk&label=service_drive" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: image/jpeg" --data-binary @service-drive.jpg
```

or `{"name": "Spring sale banner", "description": "March and April", "content_base64": "..."}`, or `{"name": "...", "url": "https://..."}` for Xcel to fetch. `name` is required and says what the photo shows. `label` is made from the name when you leave it out (`Spring sale banner` becomes `spring_sale_banner`). `description` is optional. The answer is 201 for a new label and 200 otherwise, with `created`, `changed`, `warnings` and the `asset`:

```json
{
  "id": "7b0f3c2e-5a41-4d0b-9a57-2f1c9d6e8b13",
  "kind": "photo",
  "label": "service_drive",
  "name": "Service drive at dusk",
  "description": null,
  "merge_field": "{{asset.photo.service_drive}}",
  "source": "upload",
  "format": "jpeg",
  "content_type": "image/jpeg",
  "bytes": 1834220,
  "sha256": "...",
  "width_px": 2400,
  "height_px": 1600,
  "rendition": { "content_type": "image/jpeg", "bytes": 912480, "sha256": "...", "width_px": 2400, "height_px": 1600 },
  "print": { "usual_width_in": 4, "usual_height_in": 2.65, "dpi_at_usual_size": 600, "sharp_up_to_in": 8, "warning": null },
  "uploaded_at": "2026-11-16T15:00:00.000Z",
  "created_at": "2026-11-16T15:00:00.000Z",
  "updated_at": "2026-11-16T15:00:00.000Z"
}
```

- **The file.** The rules are a dealer photo's: PNG or JPEG by content, at most 10 MB, at least 100 px on the long side, still, and drawn to the same print rendition. A photo too small to print sharply is accepted with a warning. An SVG is 415 `asset_unsupported_type`.
- **Replace.** The same `label` with another file replaces the file and keeps the `id`. The same file and details again change nothing (`changed: false`).
- **Limit.** At most 100 photos. A delete frees a place; replacing one needs none (409 `asset_limit_reached`).
- **Read and change.** `GET /v1/assets` (MCP `list_partner_assets`) lists them, oldest first, and `GET /v1/assets/{asset_id}` reads one. `PATCH /v1/assets/{asset_id}` changes `name`, `label` or `description` (`null` clears it); a label another photo has is 409 `asset_label_taken`. `DELETE /v1/assets/{asset_id}` (MCP `delete_partner_asset`) removes one, and its label is free again. An unknown or removed `asset_id` is 404 `asset_not_found`.
- **Test and live.** The library is the same for test and live keys, as saved templates are, so a test key's upload is saved.
- **Keys limited to some dealers.** They read the whole library (`can_change: false` on the list) and are refused every change with 403 `dealer_scope_forbidden`. In the console, so is a person who sees only some dealers.
- **What prints.** A creative copies each library photo it prints when it is made. Replacing or removing the photo later never changes that creative, its proof or its order; a new creative prints the library as it is then. Changing a label does the same: a creative made before keeps its photo, and a new one must name the new label.
- `{{asset.photo}}`, the dealer's newest photo, never prints a library photo, and nor does any other kind's field.
- No webhook is sent for a library change, and library photos are not sent to UpDash.

In the [partner console](console.md#asset-library), **Asset library** under Templates uploads, lists, previews, renames and removes them.

## Offers

A dealer can keep the offers it runs (a $29.95 oil change, a lease special) with their terms and dates, so any template creative prints one by `offer_id` instead of retyping it. Save only an offer the dealer named, with its real figures and dates: never make one up.

`POST /v1/dealers/{id}/offers` (MCP `save_dealer_offer`) adds one:

```json
{
  "name": "Oil change special",
  "department": "service",
  "offer": "$29.95 Oil Change",
  "detail": "Includes a tire rotation",
  "disclosure": "Up to 5 quarts of conventional oil. Plus tax. Most vehicles.",
  "starts_on": "2026-11-01",
  "ends_on": "2026-12-31"
}
```

| Field | What it is |
| --- | --- |
| `name` | Required, at most 80 characters. Its `label` comes from it (`oil_change_special`), and two offers of a dealer cannot share one: 409 `offer_name_taken`. |
| `department` | Required: `sales`, `service` or `parts`, the mail it belongs on. |
| `offer` | Required, at most 40 characters: what prints in the template's offer slot. Most templates fit 30 to 34 ([Slots](creative.md#slots)). |
| `detail` | Optional, at most 70 characters: the line under the offer, where a template has one (`offer_detail`, or `gift_detail` on the birthday pieces). |
| `disclosure` | Optional, at most 400 characters: the offer's terms, printed as the template's offer disclosure. A payment, rate or term in the offer needs them, as [compliance](creative.md#compliance-checks) checks. |
| `starts_on`, `ends_on` | Optional dates, `YYYY-MM-DD`: the first and last day it is good. `ends_on` must not be before `starts_on`. |

The answer is 201 with the whole profile and the `offer`, which adds its `id`, `label` and `status` today where the dealer is (its profile's `time_zone`, else Eastern): `active`, `scheduled` (before `starts_on`) or `ended` (after `ends_on`). At most 50 offers a dealer: 409 `offer_limit_reached`.

`GET /v1/dealers/{id}/offers` (MCP `list_dealer_offers`) lists them, active and scheduled first, and `GET .../offers/{offer_id}` reads one by id or label. `PATCH .../offers/{offer_id}` changes fields (`null` clears `detail`, `disclosure`, `starts_on` or `ends_on`; a new `name` takes a new label), and `DELETE .../offers/{offer_id}` removes one. An offer the dealer does not have is 404 `offer_not_found`.

- Every write that changes something makes a new profile version (`changed_fields: ["offers"]`) and sends `dealer.updated`, with `If-Match` and validate-only test keys as for any profile write.
- Offers are not fields of the profile: a `PUT` or `PATCH` keeps them, and one that sends `offers` is refused with 400 `invalid_profile`.

### Print an offer

Send `offer_id` (the offer's id or label) with `template_code` to `generate_creative`. It fills the template's offer slot (`offer`, `gift_offer` or `service_offer`), its detail, its offer disclosure and its `expires` slot, which prints the end date as `December 31, 2026` (shorter where the slot is). Your `copy` wins slot by slot.

| Refused | When |
| --- | --- |
| 404 `offer_not_found` | The dealer has no offer with that id or label. |
| 400 `offer_ended` | Its `ends_on` has passed. |
| 400 `offer_too_long` | Its line or detail does not fit the template's slot, which would cut it. Shorten it, or choose another template. |
| 400 `offer_not_printed` | The template has no offer slot. |
| 400 `invalid_request` | `offer_id` without `template_code`. |

The creative keeps the offer's dates, so `render_proof`, `validate_campaign` and the submit check them again ([Preflight](creative.md#preflight)): `offer_ended` (an error) once it has passed, and the warnings `offer_ends_before_in_home` (it ends before the mail's estimated last in-home day), `offer_not_started_at_in_home` and `offer_department_mismatch` (a sales offer on service mail, or a service or parts offer on sales mail). The in-home days are placeholder estimates. A creative keeps the offer it printed: after changing an offer, call `generate_creative` again to print the change.

In the [partner console](console.md#dealers), a dealer's page lists its offers with their status and dates, and members and admins add, change and remove them.

## Profile changes and orders

A creative records the profile version it was made with. Its proof, its print file and its order use that version forever. So a profile change never alters a creative you already made, a proof an approver is looking at, or an order that was approved or submitted.

To print a new logo, signature, photo, phone, name, address, makes, hours or website, call `generate_creative` again. That makes a new creative version, which sends the campaign back to `draft` and voids its proof, quote and approval, as any new creative does. Then render the proof, quote and request approval again. Where proofs print to PDF, the new approval is bound to the new print file's sha256.

`render_proof` and `validate_campaign` warn `dealer_profile_changed` when the dealer's profile moved on since the current creative was made.

## Import a CSV

`POST /v1/dealers/import` with `Content-Type: text/csv` upserts dealers by `external_id`:

- A row for a dealer you do not have yet creates it. It needs `name`, `address_line1`, `city`, `state` and `zip`.
- A row for an existing dealer merges its non-empty cells into the profile. An empty cell leaves that field as it is.
- At most 500 rows and 1 MB. Hours, hours exceptions and logos are set through the API, not the CSV.
- Send an `Idempotency-Key` to make a retry safe: the same file with the same key replays the stored result for 24 hours (`Idempotent-Replayed: true`); a different file with that key is refused with `idempotency_key_reused`.

| Column | Profile field |
| --- | --- |
| `external_id` | Required. |
| `name`, `legal_name`, `alias`, `pronunciation`, `dealer_group` | The same. |
| `address_line1`, `address_line2`, `city`, `state`, `zip` | `address`. |
| `phone_main`, `phone_sales`, `phone_service`, `phone_parts` | `phones`. |
| `contact_name`, `contact_title`, `contact_email` | `contact`. |
| `campaign_notification_emails`, `service_notification_emails` | `notification_emails`, separated by `;`. |
| `time_zone` | The same. |
| `makes`, `service_area_zips` | Separated by `;`. |
| `oem_dealer_codes` | `Make:code;Make:code`. |
| `website`, `new_inventory_url`, `used_inventory_url`, `service_scheduler_url`, `credit_app_url`, `trade_in_url` | `links`. |
| `primary_color`, `secondary_color`, `accent_color` | `brand.colors`. |
| `crm_provider`, `adf_emails`, `lead_webhook_url` | `lead_routing`. |

Column names are matched without case, and spaces become underscores. A column that is Xcel-managed, unknown or repeated refuses the whole file.

A cell that starts with `=`, `+`, `-`, `@`, a tab or a carriage return is refused with the row error `formula_value`, because a spreadsheet would run it. A phone may start with `+1`.

The answer is 200 with totals and one result per row:

```json
{
  "validated_only": false,
  "rows": 2, "created": 1, "updated": 0, "unchanged": 0, "failed": 1,
  "results": [
    { "row": 2, "external_id": "dlr-1042", "status": "created", "validated_only": false, "dealer_id": "...", "version": 1, "changed_fields": [], "error": null },
    { "row": 3, "external_id": "dlr-1043", "status": "failed", "validated_only": false, "dealer_id": null, "version": null, "changed_fields": [],
      "error": { "code": "invalid_profile", "message": "address: ...", "field": "address" } }
  ]
}
```

Row errors are `missing_external_id`, `duplicate_external_id` (an earlier row has it), `wrong_column_count`, `formula_value`, `invalid_profile`, `xcel_managed_field` and `external_id_taken`.

## Do-not-mail list

Each dealer has a lasting do-not-mail list, which every audience upload for that dealer applies: `POST`, `GET` and `DELETE /v1/dealers/{id}/suppressions`. Unlike the writes above, a test key's write saves, because each mode has its own list and the live one is never touched. See [When a person asks](audiences.md#when-a-person-asks).

Each dealer can also have an inbound email address, one per mode, that your platform's scheduled audience reports go to: each email starts a run of the [standing order](standing-orders.md#emailed-lists) its subject names. `GET` and `PUT /v1/dealers/{id}/inbound-email`; a test key's write saves, since each mode has its own address.

## Webhooks

Every new version sends a `dealer.updated` event to your endpoints in both modes, because both keys share dealers. A test dealer's events go to your test endpoints only. A test key's write to a shared dealer makes no version, so it sends nothing. It carries the dealer id, your `external_id`, the version, the changed field names and the actor type, never the values. Read the profile to see them. An approver's change of status sends the same event ([Approvers](#approvers)). See [Webhooks](webhooks.md#dealerupdated).

## UpDash

Xcel's tracking platform, UpDash, keeps some of the same facts about a dealership. Linking a dealer to its UpDash record is not part of this pilot, so `updash_linked` stays `false`. Once a dealer is linked, every change to these fields is pushed there a few minutes later: `name`, `alias`, `pronunciation`, `address`, `phones.main`, `links.website`, `links.new_inventory`, `links.used_inventory`, `links.credit_app`, `makes`, `brand.colors.primary`, `time_zone`, `hours.sales`, `contact.name`, `notification_emails` and the primary logo.

- Only fields with a value are sent. Clearing a field here does not clear it in UpDash.
- An empty `makes` or notification list is sent only when you set it to `[]`.
- UpDash keeps US time zones only and has no address line 2; it skips what it cannot store.
- `lead_routing` is never sent.
- A test dealer is never linked.
