# Post a listing

> Posts a listing for your company with the same checks as the posting form: the category, its questions, the units, the soil statement, the brand and model lists, the daily limit. Photos given by address are downloaded and stored like uploaded ones.


`POST https://dev.siteswap.pro/api/v1/listings`

Posts a listing for your company with the same checks as the posting form: the category, its questions, the units, the soil statement, the brand and model lists, the daily limit. Photos given by address are downloaded and stored like uploaded ones.

Needs the `listings:write` scope.

## Body

- `marketplace` (string): Where it is posted. It cannot change later
- `kind` ("have" | "need", required): `have` to offer something, `need` to ask for it. It cannot change later
- `category_id` (string, required): The category, from `GET /catalog/categories`
- `material_id` (string | "other"): Materials: a material of the category, or `other` with `custom_material`
- `custom_material` (string): The name, with `material_id: "other"`
- `title` (string): Made from the material when left out
- `description` (string)
- `quantity` (number): How much or how many
- `unit` (string): One of the category's units
- `quantity_basis` ("measured" | "estimated"): Materials: whether the quantity was measured
- `price_model` ("fixed" | "offers" | "free" | "pays_to_take"): How it is priced. Each marketplace takes some of these
- `price` (number): Dollars per unit, with `fixed` or `pays_to_take`
- `zip` (string, required): Where it is: the 5-digit ZIP. It is never shown; listings show the town
- `site_id` (string): Takes the ZIP from that site
- `deal` ("sale" | "trade" | "both"): Marketplaces with trades: for sale, for trade or both
- `can_load` (boolean)
- `can_deliver` (boolean)
- `pickup_only` (boolean)
- `available_from` (string): YYYY-MM-DD
- `brand_id` (string | "other"): Materials with catalog brands
- `line_id` (string | "other")
- `color_id` (string | "other")
- `model_id` (string): Fills the maker and the maker's figures
- `fields` (object (by key)): Answers to the category's questions by key, and any other field of this marketplace's posting form by its name
- `photo_urls` (string[]): Up to 8 photos by https address; each is downloaded once and stored by SiteSwap

```json
{
  "marketplace": "materials",
  "kind": "have",
  "category_id": "3",
  "material_id": "12",
  "quantity": 40,
  "unit": "yd",
  "quantity_basis": "estimated",
  "price_model": "free",
  "zip": "01801",
  "pickup_only": true,
  "fields": {
    "d_prior_use": "Residential",
    "d_contamination": "None known",
    "ack": true
  }
}
```

## Responses

- 201: Created
- 400: bad_request, key_in_url or invalid_json: the request could not be read
- 401: missing_key or invalid_key: no key, or a key that is not valid or was revoked
- 403: key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
- 404: not_found: nothing here that you may see
- 409: marketplace_closed: the marketplace is not open
- 413: too_large: the body is over 256 KB
- 422: invalid: a field was refused; `message` says which and why
- 429: rate_limited or daily_quota: wait for Retry-After seconds

## Response fields

- `id` (string): The listing's id
- `url` (string): The listing on SiteSwap
- `marketplace` (string): The marketplace key
- `kind` ("have" | "need"): `have` for something offered, `need` for something wanted
- `deal` ("sale" | "trade" | "both"): Marketplaces with trades: for sale, for trade or either; `sale` everywhere else
- `status` ("active" | "paused" | "closed"): Only `active` listings are found by search; your own can be paused or closed
- `title` (string)
- `description` (string)
- `category` (object)
- `category.id` (string)
- `category.slug` (string)
- `category.name` (string)
- `material` (string | null): The material or type, or the name typed under Other
- `brand` (string | null): The brand or maker
- `product_line` (string | null): The product line
- `color` (string | null): The color
- `model` (string | null): The model
- `quantity` (object)
- `quantity.total` (number): Listed in all
- `quantity.open` (number): Still open: not promised to an accepted offer and not handed over
- `quantity.unit` (string)
- `quantity.basis` (string): `measured` or `estimated`
- `price` (object)
- `price.model` (string): `fixed`, `offers`, `free` or `pays_to_take` (the poster pays to have it taken)
- `price.cents` (integer | null): Per unit, in US cents; null without a price
- `location` (object)
- `location.city` (string)
- `location.region` (string): The state
- `location.distance_mi` (number | null): Straight-line miles from the `zip` you sent; null without one
- `pickup_only` (boolean)
- `can_deliver` (boolean)
- `can_load` (boolean)
- `available_from` (string | null): The first day, YYYY-MM-DD
- `fields` (object (by key)): The category's questions and their answers, by key (see `GET /catalog/categories/{id}`)
- `photo` (string | null): A small picture of the first photo
- `company` (object)
- `company.slug` (string): The company's address on SiteSwap, `/c/{slug}`
- `company.name` (string)
- `company.kind` (string): What kind of company, for example `contractor` or `supplier`
- `company.url` (string): Its public page
- `sample` (boolean): True for sample data on test servers
- `created_at` (string): When it was posted. ISO 8601 in UTC

```json
{
  "data": {
    "id": "1042",
    "url": "https://siteswap.pro/listing/1042",
    "marketplace": "materials",
    "kind": "have",
    "deal": "sale",
    "status": "active",
    "title": "Clean fill, screened",
    "description": "About 40 yards from a basement dig.",
    "category": {
      "id": "3",
      "slug": "soil-and-fill",
      "name": "Soil and fill"
    },
    "material": "Clean fill",
    "brand": null,
    "product_line": null,
    "color": null,
    "model": null,
    "quantity": {
      "total": 40,
      "open": 40,
      "unit": "yd",
      "basis": "estimated"
    },
    "price": {
      "model": "free",
      "cents": null
    },
    "location": {
      "city": "Woburn",
      "region": "MA",
      "distance_mi": 3.2
    },
    "pickup_only": true,
    "can_deliver": false,
    "can_load": true,
    "available_from": null,
    "fields": {},
    "photo": null,
    "company": {
      "slug": "acme-site-work",
      "name": "Acme Site Work",
      "kind": "contractor",
      "url": "https://siteswap.pro/c/acme-site-work"
    },
    "sample": false,
    "created_at": "2026-12-02T14:03:20.991Z"
  },
  "meta": {
    "request_id": "3f9a1c0b7d2e",
    "api_version": "v1"
  }
}
```

## Example

```bash
curl -X POST "https://dev.siteswap.pro/api/v1/listings" \
  -H "Authorization: Bearer ssk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"marketplace":"materials","kind":"have","category_id":"3","material_id":"12","quantity":40,"unit":"yd","quantity_basis":"estimated","price_model":"free","zip":"01801","pickup_only":true,"fields":{"d_prior_use":"Residential","d_contamination":"None known","ack":true}}'
```