# Limits and errors

> The Seller API isn’t open to every seller yet. You can read the docs now; API keys and the Claude connector work once the API is turned on for your account. To ask for access, contact us: https://gathermark.com/help

## Limits

Limits belong to your seller account and are shared by all your keys: requests from every key count against the same per-minute limit and the same daily quota. A key can also have its own lower limit (set by Gathermark), and then that key is held to the lower one.

| Limit | Default |
|---|---|
| Requests per minute | 60 |
| Draft listings created per day (UTC) | 200 |
| Items per listing | 50 |
| Images per listing | 10 |

Your own limits may differ. `GET https://api.gathermark.com/v1/me` returns the limits of the key that calls it (its own lower limit where it has one, otherwise your account's) and today's usage, and the **API keys** page in your dashboard shows the same numbers. If you need higher limits, [contact Gathermark support](https://gathermark.com/help#contact).

### Rate limit headers

Responses to requests whose key was accepted carry these headers, including `403` `insufficient_scope` and `429` `rate_limited`. Responses refused before the key is accepted (`401`, `403` `api_access_suspended`, and the `404` you get when the API isn't enabled for your account) do not:

| Header | Meaning |
|---|---|
| `X-RateLimit-Limit` | Requests allowed per minute for this key |
| `X-RateLimit-Remaining` | Requests left in the current window |
| `X-RateLimit-Reset` | When the current minute window ends, as a Unix time in seconds (UTC) |

Over the per-minute limit you get `429 Too Many Requests` with code `rate_limited` and a `Retry-After` header (seconds). Wait that long, then retry. Each endpoint in the [API reference](https://gathermark.com/developers/api-reference) lists the `429` codes it can return.

### Daily draft quota

Each draft created counts against the daily quota. Over the quota, `POST https://api.gathermark.com/v1/listings` returns `429` with code `daily_quota_exceeded` and the time the quota resets.

## Idempotency

Send an `Idempotency-Key` header (any string up to 100 characters; a fresh UUID per listing is easiest) on `POST https://api.gathermark.com/v1/listings` so a retry after a network error cannot create the same draft twice:

```bash
curl -X POST "https://api.gathermark.com/v1/listings" \
  -H "Authorization: Bearer $GATHERMARK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @listing.json
```

Generate the key once per listing and reuse that same value when you retry; a new value on a retry creates a second draft.

- Same key, same body: you get the original response again, with status `200`.
- Keys are remembered for 48 hours.

Reusing a key can also return `409` with code `idempotency_conflict`:

| Message | What happened | What to do |
|---|---|---|
| This Idempotency-Key was already used with a different request body. | The key was used before with a different body. | Use a new key for a new listing. |
| A request with this Idempotency-Key is still in progress. | The first request with this key hasn't finished yet. | Wait a few seconds, then retry with the same key. A request that never finished frees its key after 5 minutes. |
| The listing created with this Idempotency-Key no longer exists. | The draft made with this key was deleted. | Use a new key. |

## Error format

Every error response has the same shape:

```json
{
  "error": {
    "code": "validation_error",
    "message": "Human-readable sentence.",
    "field": "items[2].price"
  }
}
```

`field` is present when the error is about one field. `message` is safe to show to a person.

A `422` `validation_error` reports only the **first** problem found, even when the request has several. Fix it and send the request again to see the next one.

## Error codes

| Status | Code | Meaning |
|---|---|---|
| `400` | JSON-RPC `-32022` | MCP only: the request is not MCP 2026-07-28, the only version `/mcp` speaks (for example an older client's `initialize` handshake). `error.data.supported` lists `2026-07-28` |
| `401` | `unauthorized` | Missing, malformed or revoked key, or a key from another environment |
| `401` | `key_expired` | The key has passed its expiry date. Create a new key |
| `403` | `insufficient_scope` | The key lacks the scope this endpoint needs |
| `403` | `api_access_suspended` | API access is suspended for this account |
| `404` | `not_found` | Not found, or it belongs to another seller. Every path returns it when the Seller API isn't enabled for your account. |
| `405` | `method_not_allowed` | That HTTP method is not supported on this path |
| `409` | `idempotency_conflict` | The `Idempotency-Key` was used before with a different body, or a request with it is still in progress |
| `409` | `listing_not_api_made` | The listing was made on the site or imported, so its content can't be changed through the API. Change it on the site (`edit_url`). |
| `409` | `profile_name_taken` | You already have a shipping profile with this name |
| `409` | `profile_in_use` | The shipping profile is still used by listings, so it can't be deleted. `fix` says what to do. |
| `409` | `listing_not_draft` | The listing is live; only drafts can be changed or deleted through the API |
| `413` | `payload_too_large` | The request body is over 1 MB (1,000,000 bytes). Send fewer or shorter fields, or image URLs rather than image data. |
| `422` | `validation_error` | A field is missing, has the wrong type, is outside its limits, or is not allowed. `field` names it. Only the first problem is reported. |
| `422` | `image_fetch_failed` | `PATCH` only: an entry in `image_urls` (the gallery or an item's) couldn't be added. Nothing is changed; `failed_images` lists each entry with its `field` and why. See [Images](https://gathermark.com/developers/images#when-an-image-fails). |
| `429` | `rate_limited` | Too many requests this minute. Wait for `Retry-After`. |
| `429` | `daily_quota_exceeded` | The daily draft quota is used up |
| `500` | `internal_error` | Something went wrong on our side. Retry with the same `Idempotency-Key` after a short wait. |
| any other | `http_error` | Any other HTTP error, with the message "Request failed.". Act on the HTTP status. |

Other codes may appear in future; if you don't recognise a code, act on the HTTP status. Errors never contain internal details. If you get a `5xx`, retry with the same `Idempotency-Key` after a short wait.

## Validation rules

Drafts are checked against these rules when you create or change them. A request that breaks one gets `422` `validation_error` naming the first field at fault.

- Unknown fields are rejected, so a typo in a field name is caught rather than ignored.
- `title`: 5 to 200 characters.
- `description` (the listing's): plain text, at most 20,000 characters. Blank lines separate paragraphs.
- `items`: at least one, and at most your items-per-listing limit (50 by default).
- Item `name`: 3 to 200 characters.
- Item `description`: plain text, at most 5,000 characters.
- `price`: a decimal string such as `"185.00"` in the listing currency, greater than zero, at most 2 decimal places, and at most 1,000,000. For a currency without minor units (such as JPY or HUF), prices must be whole amounts, such as `"1500"`.
- `quantity`: a whole number (not a string) from 1 to 10,000; defaults to 1.
- `currency`: one of the currencies listed by `GET https://api.gathermark.com/v1/vocab` (upper or lower case); defaults to your default currency.
- `condition`: one of the conditions from `GET https://api.gathermark.com/v1/vocab`, matched without regard to case.
- `nib_size`: one of the nib sizes from `GET https://api.gathermark.com/v1/vocab`, matched without regard to case. Short forms are accepted too: `EF`, `XF`, `F`, `MF`, `FM`, `M`, `B`, `BB`, and words such as `extra fine`, `fine`, `medium fine`, `medium`, `broad`, `double broad`, `stub`, `italic` and `flex` (`nib_size_short_forms` in `/v1/vocab` lists the common ones).
- `community_id`: an id from `GET https://api.gathermark.com/v1/communities`. Leave it out to use the site-wide default community (the one with `"is_default": true`).
- `shipping_profile_id`: one of your shipping profiles from `GET https://api.gathermark.com/v1/shipping-profiles`.
- `image_urls`: `https://` URLs on public hosts, each at most 2,048 characters, and at most your images-per-listing limit (10 by default) across the listing and its items. See [Images](https://gathermark.com/developers/images).
- `Idempotency-Key`: 1 to 100 printable ASCII characters.
- The whole request body: at most 1 MB.
