# Refresh specials

Same rules as `POST /dealers/{domainId}/recrawl`, defaulting to `kind=specials`: moves the next
run to now, never starts a parallel run, `409 backing_off` during failure backoff,
`429 recently_crawled` within 15 minutes of a complete run.

## Endpoint

```
POST https://api.motorsdynamic.com/api/v2/targets/{domainId}/refresh
```

## Plan and price

| Plan | Access | Price |
| --- | --- | --- |
| Free | No | not included |
| Growth | No | not included |
| Scale | No | not included |
| Enterprise | Yes | contract |

A call is billed when it answers 2xx. See [pricing](https://developers.motorsdynamic.com/pricing.md).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainId` | path | integer | yes | Site id (`id` from GET /dealers). |
| `kind` | query | `inventory` or `specials` | no |  |

## Example request

curl:

```bash
curl -X POST "https://api.motorsdynamic.com/api/v2/targets/201/refresh?kind=specials" \
  -H "x-api-key: $MD_API_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://api.motorsdynamic.com/api/v2/targets/201/refresh?kind=specials", {
  method: "POST",
  headers: { "x-api-key": process.env.MD_API_KEY },
});
if (!res.ok) throw new Error(`${res.status} ${(await res.json()).error}`);
const data = await res.json();
console.log(data);
```

Python:

```python
import os, requests

res = requests.post(
    "https://api.motorsdynamic.com/api/v2/targets/201/refresh?kind=specials",
    headers={"x-api-key": os.environ["MD_API_KEY"]},
    timeout=10,
)
res.raise_for_status()
print(res.json())
```

## Example response

```json
{
  "data": {
    "domain_id": 201,
    "kind": "specials",
    "status": "scheduled",
    "next_crawl_at": "2026-09-24T10:00:00.000000Z"
  }
}
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | object |  |
| `data.domain_id` | integer |  |
| `data.kind` | string |  |
| `data.status` | `scheduled` or `already_due` or `in_progress` |  |
| `data.run_id` | integer |  |
| `data.next_crawl_at` | string or null | RFC 3339 UTC with microseconds. |

## Errors

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_parameter` | A parameter is missing or malformed. The message names it. |
| 401 | `invalid_api_key` | The key is missing, revoked or mistyped. |
| 402 | `plan_required` | The endpoint is on a higher plan. The body names the plan and links to the upgrade. |
| 403 | `not_entitled` | The key may not read this dealer or source. |
| 404 | `not_found` | Nothing matches the identifier in the path. |
| 409 | `conflict` | The request conflicts with the current state. The error code says how. |
| 429 | `rate_limited or quota_exceeded` | Slow down (see `Retry-After`), or the Free monthly calls are used up. |
| 504 | `query_timeout` | The query passed its 4 second budget. Narrow the filters. Not billed. |

Every error has the same body: `{ "error": "<code>", "message": "..." }`. Full list: [errors](https://developers.motorsdynamic.com/docs/errors.md).
