publish_listing
Publish a Cyclesite listing on the user's behalf. Multi-step: first call (no draftId) returns a phone-friendly photo upload URL; once 3+ photos are uploaded, the next call returns either step:'live' (listing is free, no payment needed) or step:'payment_required' with a Stripe Checkout URL. Idempotent — keep calling with the same draftId until step:'live'. Requires OAuth scope listings:publish. Example flow: user says 'sell my Trek Domane' → call publish_listing → assistant directs user to upload URL → user uploads → call again → step:'live' → seller receives a confirmation email with a 24h undo link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | UK city. | |
| year | No | ||
| brand | No | ||
| model | No | ||
| title | No | Listing title (10-160 chars). | |
| draftId | No | Returned by a previous call. Omit on first call. | |
| isEbike | No | True for an electric bike. | |
| category | No | ||
| groupset | No | ||
| priceGbp | No | ||
| willShip | No | ||
| condition | No | ||
| frameSize | No | ||
| motorBrand | No | E-bike motor make, e.g. "Bosch", "Shimano", "Bafang". | |
| motorModel | No | E-bike motor model, e.g. "Performance Line CX". | |
| description | No | Listing description (30-5000 chars). | |
| frameSerial | No | Frame/serial number — runs a stolen-bike check before publish. | |
| knownIssues | No | ||
| batteryCycles | No | Charge cycles as the seller reports them. | |
| itemCondition | No | Whether the bike is new (never ridden) or used. Defaults to used. | |
| motorPosition | No | ||
| ebikeBatteryWh | No | Battery capacity in watt-hours (100-3000). | |
| rangeEstimateMiles | No | Range the seller claims on one charge, in miles. | |
| batteryHealthPercent | No | Battery health as the seller reports it, 0-100. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | ||
| draftId | No | ||
| message | Yes | ||
| listingUrl | No | ||
| paymentUrl | No | ||
| photosNeeded | No | ||
| listingFeeGbp | No | Price in GBP. | |
| photoUploadUrl | No |