API reference: Listings
Search listings
GET
https://dev.siteswap.pro/api/v1/listingsLive listings of one marketplace, with the same filters as the browse pages on the site. Nearest first when you send a zip, newest first without one. Pages follow each other by cursor, so listings added meanwhile never move a page.
Needs the listings:read scope.
Needs an API key or sign-in token in Authorization: Bearer or X-API-Key. Authentication
Query parameters
marketplacestringdefault "materials"A marketplace key, as
GET /marketplaces lists them, for example materialsqstringWords to look for: titles, materials, brands, regional names
zipstringSort by distance from here
radius"25" | "50" | "100"Miles from
zipkind"have" | "need"Only offered or only wanted
deal"sale" | "trade" | "both"Marketplaces with trades
categorystringA category slug
materialstringWith
category: materials or types by their short name, comma separated, as in a browse address on the sitebrandstringA brand or maker id
linestringA product line id
colorstringA color id
modelstringA model id
platformstringA battery platform id
price"fixed" | "offers" | "free" | "pays_to_take"Materials: only this kind of price
delivers"1"Only listings that can deliver
pickup"1"Only pickup only listings
loading"1"Materials: loading on site
ships"1"Tools: ships
companystringOnly this company's listings, by its slug
cursorstringThe
next_cursor of the page before. Leave it out for the first pagelimitintegerdefault 25How many to return on one page
Responses
200OK
400bad_request, key_in_url or invalid_json: the request could not be read
401missing_key or invalid_key: no key, or a key that is not valid or was revoked
403key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
404not_found: nothing here that you may see
413too_large: the body is over 256 KB
429rate_limited or daily_quota: wait for Retry-After seconds
Response fields
idstringrequiredThe listing's id
urlstringrequiredThe listing on SiteSwap
marketplacestringrequiredThe marketplace key
kind"have" | "need"requiredhave for something offered, need for something wanteddeal"sale" | "trade" | "both"requiredMarketplaces with trades: for sale, for trade or either;
sale everywhere elsestatus"active" | "paused" | "closed"requiredOnly
active listings are found by search; your own can be paused or closedtitlestringrequireddescriptionstringrequiredcategoryobjectrequiredcategory.idstringrequiredcategory.slugstringrequiredcategory.namestringrequiredmaterialstring | nullrequiredThe material or type, or the name typed under Other
brandstring | nullrequiredThe brand or maker
product_linestring | nullrequiredThe product line
colorstring | nullrequiredThe color
modelstring | nullrequiredThe model
quantityobjectrequiredquantity.totalnumberrequiredListed in all
quantity.opennumberrequiredStill open: not promised to an accepted offer and not handed over
quantity.unitstringrequiredquantity.basisstringrequiredmeasured or estimatedpriceobjectrequiredprice.modelstringrequiredfixed, offers, free or pays_to_take (the poster pays to have it taken)price.centsinteger | nullrequiredPer unit, in US cents; null without a price
locationobjectrequiredlocation.citystringrequiredlocation.regionstringrequiredThe state
location.distance_minumber | nullrequiredStraight-line miles from the
zip you sent; null without onepickup_onlybooleanrequiredcan_deliverbooleanrequiredcan_loadbooleanrequiredavailable_fromstring | nullrequiredThe first day, YYYY-MM-DD
fieldsobject (by key)requiredThe category's questions and their answers, by key (see
GET /catalog/categories/{id})photostring | nullrequiredA small picture of the first photo
companyobjectrequiredcompany.slugstringrequiredThe company's address on SiteSwap,
/c/{slug}company.namestringrequiredcompany.kindstringrequiredWhat kind of company, for example
contractor or suppliercompany.urlstringrequiredIts public page
samplebooleanrequiredTrue for sample data on test servers
created_atstringrequiredWhen it was posted. ISO 8601 in UTC
SiteSwap API v1Support