# Conventions and versioning

> 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

The rules every endpoint follows: how ids, money, times and lists look, which values can grow, and what we promise not to change. The [API reference](https://gathermark.com/developers/api-reference) has the exact shape of every response, with an example for every field.

## IDs

- Every id is an opaque string, such as `h7Gf2KpL9sQw4ZxC`. Store it as you get it, compare it exactly (ids are case-sensitive) and don't parse it or assume a length.
- Only public ids appear in requests and responses. The same id is used in paths (`listing_id` in `/v1/listings/{listing_id}`) and in bodies (`shipping_profile_id`, `community_id`).
- A listing keeps its id when it is published.
- Items and images have ids too. An image id stays the same while the image is kept, including when the listing is published: gallery photos and item photos alike.

## Money

- Prices and amounts are **decimal strings** in the currency of the listing, never numbers, so nothing is lost to floating point.
- They use the currency's own decimals: `"185.00"` in USD or EUR, `"1500"` in JPY or HUF (currencies without minor units). Send prices the same way: a JPY price with decimals is rejected.
- `currency` is an ISO 4217 code, such as `USD`. Every price on a listing is in the listing's currency.
- Shipping profiles are the exception: `flat_fee_amount` and `free_above_amount` are whole numbers in hundredths of the currency (`800` is 8.00 USD), as the site's shipping profile form stores them. Every method has both fields; one the method doesn't use is `null`. A `free` method is `{ "method": "free", "flat_fee_amount": null, "free_above_amount": null }`, and so is `quote` (with `"method": "quote"`).

## Times and dates

- Timestamps (every field ending in `_at`, such as `created_at` and `quota_resets_at`) are ISO 8601 in UTC with a `Z`, to the second: `2026-11-24T17:05:00Z`.
- A listing's `created_at` is when it was first saved, as a draft. It stays the same when the draft is published (`GET https://api.gathermark.com/v1/listings` is ordered by it).
- Calendar dates are `YYYY-MM-DD`: `usage_today.date` in `GET https://api.gathermark.com/v1/me` (the UTC day the counts are for).
- `X-RateLimit-Reset` is a Unix time in seconds (UTC). `Retry-After` is a number of seconds to wait.
- Daily limits and quotas reset at midnight UTC.

## Lists and pagination

Lists come newest first unless the endpoint says otherwise.

| Endpoint | How to page | Default | Maximum |
|---|---|---|---|
| `GET https://api.gathermark.com/v1/listings` | `limit` and `cursor` | 20 | 100 |

- **Cursors.** The response has `next_cursor`. Pass it as `cursor` to get the next page; it is `null` on the last page. A cursor is opaque: don't build or change one.
- `GET https://api.gathermark.com/v1/shipping-profiles` and `GET https://api.gathermark.com/v1/communities` return everything in one response.

## Shapes

- **Listing and ListingSummary.** `GET https://api.gathermark.com/v1/listings` returns each listing as a `ListingSummary`: its id, status, source, title, currency, `item_count`, `edit_url`, `listing_url` and timestamps. Everything else (items, images, `missing`, `warnings`) is on the full `Listing`, which `GET https://api.gathermark.com/v1/listings/{id}`, create and `PATCH` return.
- **Links.** Every listing has `edit_url`, its edit page on Gathermark, and `listing_url`, its public page (the one buyers see). `listing_url` is set once the listing is published, including when it has since sold, expired or gone inactive (the page then says it is no longer for sale); it is `null` for a draft, and for a frozen listing whose page is hidden.
- **Images.** Every image is `{ "id": "...", "url": "https://..." }`, the same for a listing's gallery (`images`) and an item's photos (`items[].images`).
- **Warnings.** `warnings` is always on a `Listing`. Create lists what was skipped (an image URL that could not be fetched, for example; see [Images](https://gathermark.com/developers/images)); every other response has `[]`. A `PATCH` doesn't skip images: one it can't add fails the request with `422` `image_fetch_failed` and nothing is changed.
- **`missing`.** The publish checks a listing (or, on `GET https://api.gathermark.com/v1/me`, your account) still fails, in order. `can_publish` is `true` exactly when `missing` is empty. On a published listing they still report the publish checks, not whether it is for sale: read `status` for that (a sold listing can show `can_publish: true`).
- **`failed_checks`.** Next to `missing`, a `Listing` has `failed_checks`: each failing check in full, with `check` (the code in `missing`), `message`, `fix`, the `field` to change where there is one (such as `items[1].price`) and, for a check on one item, `item_id`. An item check appears once for each item that fails it.
- **`community_id`.** A draft with no community chosen shows the default community it will be published in, so the value doesn't change on publish. It is `null` only when there is no community to publish in (then `missing` has `community`).
- **Empty values.** A field the shape always has is `null` when it has no value, and a list with nothing in it is `[]`. A few fields only appear where they apply (`archived` only on live listings, for example); the reference says which.

## Status values

A listing's `status` is one of:

| Status | Meaning |
|---|---|
| `draft` | Not published yet. |
| `active` | Live and for sale. |
| `sold` | Sold out or marked sold. |
| `expired` | Its listing period ended. |
| `inactive` | Not for sale for any other reason, for example paused, delisted or frozen. Open `edit_url` to see why. |

Treat a status you don't recognise like `inactive` (for a listing) or as information only, and carry on.

## Versioning and breaking changes

The API is versioned in the path: every endpoint starts with `/v1/`. Within `/v1/`:

- **We may add things without notice:** new endpoints, new optional request fields, new response fields, new error codes, new `missing` codes, new `warnings` codes and new status values. Write clients that ignore fields they don't know and handle codes and values they don't know (act on the HTTP status for an unknown error code).
- **We won't, without a new version:** remove or rename a field, change a field's type or meaning, make an optional request field required, or change an endpoint's path or method.
- **Deprecations** are announced in the changelog below, with the date, before anything is removed. A deprecated field keeps working until that date.
- Fixes that make the API do what these docs already say (a timestamp now in UTC with `Z`, say) are not breaking changes. They are listed in the changelog.

The OpenAPI spec at `https://api.gathermark.com/v1/openapi.json` always describes the API as it is now.

## Changelog

### 2026-11-27

- **`created_at` stays the same on publish.** A listing's `created_at` is when it was first saved as a draft; publishing no longer moves it to the publish time.
- **Item photo ids stay the same on publish**, like gallery photo ids.
- **A draft shows its community.** A draft with no community chosen reports the default community it will be published in (it was `null`).
- **`failed_checks` on every listing.** Each failing publish check in full, next to `missing`. Checks on one item (`item_name`, `item_description`, `item_price`, `item_quantity`) carry `item_id`.
- **One shipping method shape.** Every method has `flat_fee_amount` and `free_above_amount`, `null` when the method doesn't use it. A `free` method could read `"flat_fee_amount": 0` before.
- **Documented, not changed:** what `can_publish` means on a published listing.

### 2026-11-24

- **Typed responses.** Every operation in the OpenAPI spec now has a typed response schema, with a description and an example for every field, a short stable `operationId` (such as `createListing`) and a tag. The spec declares the `Idempotency-Key` header on create, the `X-RateLimit-*` and `Retry-After` response headers, and the length limits and allowed values of request fields. Generated clients get real types.
- **One image shape.** Item photos now carry an `id`, so every image is `{ "id", "url" }`, the same as listing photos (item photos had only `url`).
- **`warnings` on every listing response.** It is `[]` when there is nothing to report.
- **Listing status.** `status` is always one of `draft`, `active`, `sold`, `expired` or `inactive`. Listings the site holds in other states (paused, delisted, frozen) now read `inactive`.
- **Prices in the currency's decimals.** Prices in currencies without minor units (JPY, HUF) are whole amounts, such as `"1500"` (they were `"1500.00"`).
- **UTC timestamps.** Every timestamp ends in `Z`.
- **Shipping profiles.** `GET https://api.gathermark.com/v1/shipping-profiles` returns each profile in the same shape as create and update, including `live_listing_count`.
- **Key expiry.** API keys can now expire (30, 60, 90, 180 or 365 days, or never; new keys default to 90 days). A request with an expired key gets `401` `key_expired`: create a new key. See [Authentication and scopes](https://gathermark.com/developers/authentication).
- **`can_publish` follows the publish checks.** `can_publish` and `missing` on a listing now report exactly the checks publishing runs, in the order it runs them. `missing` is an open set: new codes can be added.
- **MCP output schemas.** Every MCP tool declares an `outputSchema`, and its structured result matches the response shapes above.
