{"openapi":"3.0.3","info":{"title":"Commonplace agent listings","version":"1.0.0","description":"Save a draft for a seller, quote what they take home, and take the listing down if it sells somewhere else. Publishing happens when the seller taps the confirm link. No account is required."},"servers":[{"url":"https://trycommonplace.com"}],"paths":{"/api/agent/quote":{"post":{"operationId":"quoteCrossList","summary":"Quote take-home and buyer price","description":"The price the seller asked for on Facebook Marketplace, Craigslist, or OfferUp becomes their take-home on Commonplace. The buyer price includes pickup and delivery.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"The two prices."}}}},"/api/agent/listings/draft":{"post":{"operationId":"createCrossListDraft","summary":"Save a draft and return a confirm link","description":"Saves a draft only. Returns confirm_url and manage_token. When seller_phone is included, the seller is also texted the confirm link. Photos are downloaded and re-hosted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}}},"responses":{"201":{"description":"Draft saved. Nothing is published."}}}},"/api/agent/listings/sold":{"post":{"operationId":"markSoldElsewhere","summary":"Take down a listing that sold somewhere else","description":"Pass the manage_token returned when the draft was saved. No account is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["manage_token"],"properties":{"manage_token":{"type":"string"}}}}}},"responses":{"200":{"description":"The listing is down, or the unpublished draft has expired."}}}}},"components":{"schemas":{"QuoteRequest":{"type":"object","required":["category","price"],"properties":{"category":{"type":"string","description":"A category slug, name, or the item words."},"price":{"type":"number","description":"Dollars. By default this is the seller's take-home. The buyer price includes pickup and delivery."},"price_type":{"type":"string","enum":["take_home","facebook_buyer_price"],"default":"take_home","description":"take_home (the default) is what the seller takes home. facebook_buyer_price is what a buyer pays on the other site."},"zip":{"type":"string","description":"Optional 5-digit pickup ZIP."}}},"DraftRequest":{"type":"object","required":["title","price"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"price":{"type":"number","description":"Dollars. By default this is the seller's take-home. The buyer price includes pickup and delivery."},"price_type":{"type":"string","enum":["take_home","facebook_buyer_price"],"default":"take_home","description":"take_home (the default) is what the seller takes home. facebook_buyer_price is what a buyer pays on the other site."},"photos":{"type":"array","items":{"type":"string"},"description":"https image URLs or data:image URLs."},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"condition":{"type":"string"},"category":{"type":"string"},"brand":{"type":"string"},"seller_name":{"type":"string"},"seller_phone":{"type":"string"},"seller_email":{"type":"string"},"source_agent":{"type":"string"},"source_url":{"type":"string"}}}}}}