{"info":{"description":"Current OpenAPI description for the implemented CMD Market public and seller API routes. CMD Market is built to support many agent clients over time; OpenClaw is the first implemented browser handoff integration described here. This document is intentionally narrow and does not describe planned marketplace routes that are not live yet.","title":"CMD Market API","version":"0.4.0"},"openapi":"3.1.0","paths":{"/api/categories":{"get":{"description":"Lists the current active category summaries that sellers and agents can use before authoring listing attributes.","summary":"List public categories","responses":{"200":{"description":"List the current active public categories that agents can use for seller authoring flows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorySummariesResponse"}}}}}}},"/api/categories/{categorySlug}":{"get":{"description":"Reads category metadata, including required attributes and allowed values for authoring.","summary":"Read category metadata","parameters":[{"in":"path","name":"categorySlug","schema":{"type":"string","description":"Category slug.","example":"trading-cards"},"required":true,"description":"Category slug."}],"responses":{"200":{"description":"Read category metadata, including required attributes and allowed values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponse"}}}},"404":{"description":"Category could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/listings/{listingId}":{"get":{"description":"Reads the canonical public listing resource for a published listing. Unpublished or missing listings return 404.","summary":"Read a public listing","parameters":[{"in":"path","name":"listingId","schema":{"type":"string","description":"Listing identifier.","example":"lst_123"},"required":true,"description":"Listing identifier."}],"responses":{"200":{"description":"Read the canonical public listing resource after a draft has been published, including normalized flat domestic shipping plus shareable listing and media URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicListingResponse"}}}},"404":{"description":"Published listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/openclaw/authorization-sessions":{"post":{"description":"Starts a short-lived OpenClaw browser handoff authorization session for a public client instance and returns the browser URL. The request includes a PKCE code challenge and optional proposed first-workspace details.","summary":"Create an OpenClaw authorization session","requestBody":{"description":"PKCE code challenge for the initiating OpenClaw client instance, plus optional proposed first-workspace details to prefill during the browser handoff.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionCreateRequest"}}}},"responses":{"200":{"description":"Start a short-lived OpenClaw authorization session for the current client instance and return the browser handoff URL, with optional proposed first-workspace details and a PKCE code challenge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionCreateResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/openclaw/authorization-sessions/{sessionId}/status":{"post":{"description":"Polls the current state of an OpenClaw browser handoff authorization session using the PKCE code verifier from the same client instance that started it.","summary":"Poll an OpenClaw authorization session","parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","description":"OpenClaw authorization session identifier.","example":"auth_123"},"required":true,"description":"OpenClaw authorization session identifier."}],"requestBody":{"description":"PKCE code verifier for the OpenClaw authorization session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionVerifierRequest"}}}},"responses":{"200":{"description":"Poll the current state of an OpenClaw authorization session using the matching PKCE code verifier from the client instance that started it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionStatusResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/openclaw/authorization-sessions/{sessionId}/redeem":{"post":{"description":"Redeems an authorized OpenClaw browser handoff authorization session into a seller-scoped API key using the PKCE code verifier from the same client instance that started it.","summary":"Redeem an OpenClaw authorization session","parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","description":"OpenClaw authorization session identifier.","example":"auth_123"},"required":true,"description":"OpenClaw authorization session identifier."}],"requestBody":{"description":"PKCE code verifier for the OpenClaw authorization session.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionVerifierRequest"}}}},"responses":{"200":{"description":"Redeem an authorized OpenClaw authorization session into a seller-scoped API key using the matching PKCE code verifier from the client instance that started it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionRedeemResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/context":{"get":{"description":"Returns the resolved seller workspace and actor metadata for the current browser session or seller API key. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Resolve seller context","responses":{"200":{"description":"Resolve the seller workspace and actor for the current browser session or seller API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerContextResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/listings":{"post":{"description":"Creates a seller-owned draft listing. Use a browser session or seller API key for the request itself; API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Create a draft listing","requestBody":{"description":"Optional initial fields for a seller-owned draft listing.","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftListingRequest"}}}},"responses":{"200":{"description":"Create a seller-owned draft listing with optional initial listing fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerListingResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/listings/{listingId}":{"get":{"description":"Reads a seller-owned listing resource for the active seller context. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Read a seller listing","parameters":[{"in":"path","name":"listingId","schema":{"type":"string","description":"Listing identifier.","example":"lst_123"},"required":true,"description":"Listing identifier."}],"responses":{"200":{"description":"Patch draft listing fields and typed category attributes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerListingResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Draft listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}},"patch":{"description":"Patches draft listing fields and typed category attributes for the active seller context. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Patch a draft listing","parameters":[{"in":"path","name":"listingId","schema":{"type":"string","description":"Listing identifier.","example":"lst_123"},"required":true,"description":"Listing identifier."}],"requestBody":{"description":"Draft listing patch payload.","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftListingRequest"}}}},"responses":{"200":{"description":"Read a seller-owned draft or published listing resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerListingResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Draft listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/listings/{listingId}/media":{"post":{"description":"Attaches uploaded media to a seller-owned draft listing. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Attach draft listing media","parameters":[{"in":"path","name":"listingId","schema":{"type":"string","description":"Listing identifier.","example":"lst_123"},"required":true,"description":"Listing identifier."}],"requestBody":{"description":"Media attachment payload for a seller-owned draft listing.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachListingMediaRequest"}}}},"responses":{"200":{"description":"Attach uploaded media to a seller-owned draft listing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerListingResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Draft listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/listings/{listingId}/publish":{"post":{"description":"Publishes a seller-owned draft listing after seller eligibility, media, and category requirements pass validation. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Publish a draft listing","parameters":[{"in":"path","name":"listingId","schema":{"type":"string","description":"Listing identifier.","example":"lst_123"},"required":true,"description":"Listing identifier."}],"responses":{"200":{"description":"Publish a draft listing once seller eligibility, media, and required attributes are complete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerListingResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Draft listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"422":{"description":"Listing draft is not publishable yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingValidationProblem"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/shipping-profiles":{"get":{"description":"Lists seller-owned flat domestic shipping profiles. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"List shipping profiles","responses":{"200":{"description":"List reusable seller-owned shipping profiles for flat domestic shipping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileListResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}},"post":{"description":"Creates a seller-owned flat domestic shipping profile. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Create a shipping profile","requestBody":{"description":"Seller-owned flat domestic shipping profile request payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShippingProfileRequest"}}}},"responses":{"200":{"description":"Create a seller-owned flat domestic shipping profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/shipping-profiles/{shippingProfileId}":{"get":{"description":"Reads one seller-owned flat domestic shipping profile. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Read a shipping profile","parameters":[{"in":"path","name":"shippingProfileId","schema":{"type":"string","description":"Shipping profile identifier.","example":"shp_123"},"required":true,"description":"Shipping profile identifier."}],"responses":{"200":{"description":"Read one seller-owned shipping profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Shipping profile could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}},"patch":{"description":"Patches one seller-owned flat domestic shipping profile. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Patch a shipping profile","parameters":[{"in":"path","name":"shippingProfileId","schema":{"type":"string","description":"Shipping profile identifier.","example":"shp_123"},"required":true,"description":"Shipping profile identifier."}],"requestBody":{"description":"Seller-owned flat domestic shipping profile patch payload.","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShippingProfileRequest"}}}},"responses":{"200":{"description":"Patch one seller-owned shipping profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingProfileResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Shipping profile could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/publishability":{"get":{"description":"Checks whether the resolved seller workspace is currently publishable. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Resolve seller publishability","responses":{"200":{"description":"Check whether the resolved seller workspace is currently allowed to publish listings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerPublishabilityResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller workspace is either unresolved/forbidden or resolved successfully but not publishable yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerPublishabilityForbiddenResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}},"/api/seller/upload-sessions":{"post":{"description":"Creates draft-scoped direct-upload sessions for listing media. API keys do not authenticate browser `/seller/*` routes.","security":[{"browserSession":[]},{"sellerApiKey":[]}],"summary":"Create draft upload sessions","requestBody":{"description":"Draft-scoped upload session request payload.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionsRequest"}}}},"responses":{"200":{"description":"Mint draft-scoped direct-upload sessions for listing media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionsResponse"}}}},"400":{"description":"Request body or route input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"403":{"description":"Seller context or access is forbidden for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"404":{"description":"Draft listing could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"409":{"description":"Seller context or listing state is invalid for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerApiErrorResponse"}}}}}}}},"components":{"schemas":{"OpenClawAuthorizationSessionCreateRequest":{"type":"object","properties":{"code_challenge":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"code_challenge_method":{"type":"string","const":"S256"},"proposed_workspace":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}}},"required":["code_challenge","code_challenge_method"],"description":"PKCE proof for the OpenClaw public-client handoff, plus optional first-workspace details that CMD Market can prefill during onboarding."},"OpenClawAuthorizationSessionVerifierRequest":{"type":"object","properties":{"code_verifier":{"type":"string","minLength":43,"maxLength":128,"pattern":"^[A-Za-z0-9\\-._~]+$"}},"required":["code_verifier"],"description":"PKCE code verifier proving control of the OpenClaw client instance that started the session."},"CreateDraftListingRequest":{"type":"object","properties":{"category_id":{"description":"Optional category identifier for the draft listing.","example":"cat_cards","type":"string","minLength":1},"condition_code":{"description":"Optional marketplace condition code.","example":"used_good","type":"string","minLength":1},"description":{"description":"Optional seller-facing listing description.","example":"Clean slab, no cracks, centered well.","type":"string","minLength":1},"price":{"$ref":"#/components/schemas/DraftListingPriceInput"},"quantity_available":{"description":"Optional available quantity.","example":1,"type":"integer","minimum":0,"maximum":2147483647},"shipping_profile_id":{"description":"Optional seller-owned shipping profile identifier.","example":"shp_123","type":"string","minLength":1},"title":{"description":"Optional listing title.","example":"1999 Charizard Holo PSA 8","type":"string","minLength":1}},"additionalProperties":false,"description":"Payload for creating a seller-owned draft listing."},"DraftListingPriceInput":{"description":"Optional listing price.","type":"object","properties":{"amount_minor":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Price amount in minor currency units.","example":125000},"currency_code":{"type":"string","minLength":3,"maxLength":3,"description":"ISO currency code.","example":"USD"}},"required":["amount_minor","currency_code"]},"UpdateDraftListingRequest":{"type":"object","properties":{"category_id":{"description":"Optional category identifier for the draft listing.","example":"cat_cards","type":"string","minLength":1},"condition_code":{"description":"Optional marketplace condition code.","example":"used_good","type":"string","minLength":1},"description":{"description":"Optional seller-facing listing description.","example":"Clean slab, no cracks, centered well.","type":"string","minLength":1},"price":{"$ref":"#/components/schemas/DraftListingPriceInput"},"quantity_available":{"description":"Optional available quantity.","example":1,"type":"integer","minimum":0,"maximum":2147483647},"shipping_profile_id":{"description":"Optional seller-owned shipping profile identifier.","example":"shp_123","type":"string","minLength":1},"title":{"description":"Optional listing title.","example":"1999 Charizard Holo PSA 8","type":"string","minLength":1},"attributes":{"description":"Optional typed category attributes to set or clear on the draft listing.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Category attribute key.","example":"grading_company"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["key","value"]}}},"additionalProperties":false,"description":"Payload for patching a seller-owned draft listing."},"AttachListingMediaRequest":{"type":"object","properties":{"media":{"minItems":1,"type":"array","items":{"type":"object","properties":{"alt_text":{"description":"Optional alt text for the uploaded media.","example":"Front of the card","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"asset_key":{"type":"string","minLength":1,"description":"Stable storage key returned by the upload session step.","example":"listings/drafts/lst_123/asset_123-front.jpg"},"sort_order":{"description":"Optional display order for the media item.","example":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["asset_key"]}}},"required":["media"],"description":"Draft listing media attachment payload."},"CreateShippingProfileRequest":{"type":"object","properties":{"domestic_rate_minor":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Flat domestic shipping rate in USD minor units.","example":499},"handling_time_days":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}],"description":"Estimated seller handling time in business days.","example":2},"name":{"type":"string","minLength":1,"description":"Human-readable shipping profile name.","example":"Card mailer"}},"required":["domestic_rate_minor","handling_time_days","name"],"additionalProperties":false,"description":"Payload for creating a seller-owned flat domestic shipping profile."},"UpdateShippingProfileRequest":{"type":"object","properties":{"domestic_rate_minor":{"description":"Flat domestic shipping rate in USD minor units.","example":0,"type":"integer","minimum":0,"maximum":2147483647},"handling_time_days":{"description":"Estimated seller handling time in business days.","example":1,"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"name":{"description":"Human-readable shipping profile name.","example":"Free shipping cards","type":"string","minLength":1}},"additionalProperties":false,"description":"Payload for patching a seller-owned shipping profile."},"UploadSessionsRequest":{"type":"object","properties":{"listing_id":{"type":"string","minLength":1,"description":"Seller-owned draft listing identifier.","example":"lst_123"},"files":{"minItems":1,"type":"array","items":{"type":"object","properties":{"content_type":{"type":"string","minLength":1,"description":"MIME type for the asset upload.","example":"image/jpeg"},"filename":{"type":"string","minLength":1,"description":"Original filename for the uploaded asset.","example":"front.jpg"},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"File size in bytes.","example":2488331}},"required":["content_type","filename","size_bytes"]}}},"required":["listing_id","files"],"description":"Draft-scoped upload session request payload."},"CategorySummariesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CategorySummary"}}},"required":["data"],"additionalProperties":false,"description":"Category summary list response envelope."},"CategorySummary":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["description","id","name","slug"],"additionalProperties":false,"description":"Public category summary."},"CategoryResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/CategoryAttribute"}},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["attributes","description","id","name","slug"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"Category detail response envelope."},"CategoryAttribute":{"type":"object","properties":{"allowed_values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"is_required":{"type":"boolean"},"key":{"type":"string"},"label":{"type":"string"},"value_type":{"type":"string","enum":["boolean","enum","json","number","text"]}},"required":["allowed_values","is_required","key","label","value_type"],"additionalProperties":false,"description":"Category attribute definition."},"SellerApiErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryAfterMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["code","message","retryAfterMs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Standard seller API error envelope."},"PublicListingResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/ListingAttribute"}},"category":{"anyOf":[{"$ref":"#/components/schemas/ListingCategory"},{"type":"null"}]},"condition_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"listing_url":{"type":"string","format":"uri"},"media":{"type":"array","items":{"$ref":"#/components/schemas/PublicListingMediaItem"}},"object":{"type":"string","const":"listing"},"price":{"anyOf":[{"$ref":"#/components/schemas/ListingPrice"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity_available":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"shipping":{"$ref":"#/components/schemas/ListingShipping"},"seller":{"$ref":"#/components/schemas/ListingSeller"},"status":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"}},"required":["attributes","category","condition_code","description","id","listing_url","media","object","price","published_at","quantity_available","shipping","seller","status","title","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"Public listing response envelope."},"ListingAttribute":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"value_type":{"type":"string","enum":["boolean","enum","json","number","text"]}},"required":["key","label","value","value_type"],"additionalProperties":false,"description":"Typed listing attribute value."},"ListingCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false,"description":"Listing category summary."},"PublicListingMediaItem":{"type":"object","properties":{"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"sort_order":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"}},"required":["alt_text","id","sort_order","url"],"additionalProperties":false,"description":"Public listing media item."},"ListingPrice":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency_code":{"type":"string","minLength":3,"maxLength":3}},"required":["amount_minor","currency_code"],"additionalProperties":false,"description":"Listing price in minor units."},"ListingShipping":{"type":"object","properties":{"currency_code":{"type":"string","const":"USD"},"domestic_rate_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"handling_time_days":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"mode":{"type":"string","const":"flat"},"scope":{"type":"string","const":"us_50_states"}},"required":["currency_code","domestic_rate_minor","handling_time_days","mode","scope"],"additionalProperties":false,"description":"Normalized flat domestic shipping summary."},"ListingSeller":{"type":"object","properties":{"display_name":{"type":"string"},"id":{"type":"string"},"slug":{"type":"string"}},"required":["display_name","id","slug"],"additionalProperties":false,"description":"Seller summary for listing responses."},"OpenClawAuthorizationSessionCreateResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"browser_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"session_id":{"type":"string"}},"required":["browser_url","expires_at","session_id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"OpenClaw authorization-session creation response."},"OpenClawAuthorizationSessionStatusResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"session_id":{"type":"string"},"status":{"$ref":"#/components/schemas/OpenClawAuthorizationSessionStatus"}},"required":["expires_at","session_id","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"OpenClaw authorization-session polling response."},"OpenClawAuthorizationSessionStatus":{"type":"string","enum":["authorized","cancelled","expired","pending","redeemed","rejected"],"description":"Current state of an OpenClaw browser handoff authorization session.","example":"pending"},"OpenClawAuthorizationSessionRedeemResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"api_key":{"type":"string"},"seller_context":{"type":"object","properties":{"eligibility_source":{"$ref":"#/components/schemas/SellerEligibilitySource"},"eligibility_status":{"$ref":"#/components/schemas/SellerEligibilityStatus"},"organization_id":{"type":"string"},"seller_account_id":{"type":"string"}},"required":["eligibility_source","eligibility_status","organization_id","seller_account_id"],"additionalProperties":false},"session_id":{"type":"string"}},"required":["api_key","seller_context","session_id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"OpenClaw authorization-session redeem response."},"SellerEligibilitySource":{"anyOf":[{"type":"string","enum":["manual_override","x_verification"]},{"type":"null"}],"description":"Current source of seller eligibility, if one has been applied.","example":"x_verification"},"SellerEligibilityStatus":{"type":"string","enum":["pending","eligible","revoked","suspended"],"description":"Current listing eligibility state for the seller workspace.","example":"eligible"},"SellerContextResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SellerContext"}},"required":["data"],"additionalProperties":false,"description":"Seller context response envelope."},"SellerContext":{"type":"object","properties":{"actorApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"type":"string","enum":["user","api_key"]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"eligibilitySource":{"$ref":"#/components/schemas/SellerEligibilitySource"},"eligibilityStatus":{"$ref":"#/components/schemas/SellerEligibilityStatus"},"organizationId":{"type":"string"},"sellerAccountId":{"type":"string"}},"required":["actorApiKeyId","actorType","actorUserId","eligibilitySource","eligibilityStatus","organizationId","sellerAccountId"],"additionalProperties":false,"description":"Resolved seller workspace and actor metadata for the current request."},"SellerListingResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/ListingAttribute"}},"category":{"anyOf":[{"$ref":"#/components/schemas/ListingCategory"},{"type":"null"}]},"condition_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"management":{"type":"object","properties":{"draft_validation":{"type":"object","properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/DraftValidationIssue"}},"publishable":{"type":"boolean"}},"required":["issues","publishable"],"additionalProperties":false}},"required":["draft_validation"],"additionalProperties":false},"media":{"type":"array","items":{"$ref":"#/components/schemas/SellerListingMediaItem"}},"object":{"type":"string","const":"listing"},"price":{"anyOf":[{"$ref":"#/components/schemas/ListingPrice"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity_available":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"shipping":{"anyOf":[{"$ref":"#/components/schemas/ListingShipping"},{"type":"null"}]},"shipping_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"seller":{"$ref":"#/components/schemas/ListingSeller"},"status":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"}},"required":["attributes","category","condition_code","created_at","description","id","management","media","object","price","published_at","quantity_available","shipping","shipping_profile_id","seller","status","title","updated_at"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"Seller listing response envelope."},"DraftValidationIssue":{"type":"object","properties":{"code":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["code","field","message"],"additionalProperties":false,"description":"Field-level draft validation issue."},"SellerListingMediaItem":{"type":"object","properties":{"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"asset_key":{"type":"string"},"id":{"type":"string"},"sort_order":{"type":"integer","minimum":0,"maximum":9007199254740991},"url":{"type":"string","format":"uri"}},"required":["alt_text","asset_key","id","sort_order","url"],"additionalProperties":false,"description":"Attached media for a seller-owned listing."},"ListingValidationProblem":{"type":"object","properties":{"code":{"type":"string","const":"listing_validation_failed"},"detail":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/DraftValidationIssue"}},"instance":{"type":"string"},"status":{"type":"number","const":422},"title":{"type":"string","const":"Listing validation failed"},"type":{"type":"string","const":"https://cmd.market/problems/listing-validation-failed"}},"required":["code","detail","errors","instance","status","title","type"],"additionalProperties":false,"description":"Problem Details payload returned when a listing draft cannot be published yet."},"ShippingProfileListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ShippingProfile"}}},"required":["data"],"additionalProperties":false,"description":"Shipping profile list response envelope."},"ShippingProfile":{"type":"object","properties":{"created_at":{"type":"string"},"currency_code":{"type":"string","const":"USD"},"domestic_rate_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"handling_time_days":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"id":{"type":"string"},"name":{"type":"string"},"object":{"type":"string","const":"shipping_profile"},"scope":{"type":"string","const":"us_50_states"},"updated_at":{"type":"string"}},"required":["created_at","currency_code","domestic_rate_minor","handling_time_days","id","name","object","scope","updated_at"],"additionalProperties":false,"description":"Seller-owned flat domestic shipping profile."},"ShippingProfileResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ShippingProfile"}},"required":["data"],"additionalProperties":false,"description":"Shipping profile response envelope."},"SellerPublishabilityResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/SellerPublishabilityIssue"}},"publishable":{"type":"boolean"},"sellerContext":{"$ref":"#/components/schemas/SellerContext"}},"required":["issues","publishable","sellerContext"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"Seller publishability response envelope."},"SellerPublishabilityIssue":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false,"description":"A publishability issue blocking listing publication."},"SellerPublishabilityForbiddenResponse":{"anyOf":[{"$ref":"#/components/schemas/SellerApiErrorResponse"},{"$ref":"#/components/schemas/SellerPublishabilityResponse"}],"description":"Forbidden response for seller publishability checks. This may be a standard seller API error envelope or an ineligible-but-resolved publishability payload."},"UploadSessionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UploadSession"}}},"required":["data"],"additionalProperties":false,"description":"Upload session response envelope."},"UploadSession":{"type":"object","properties":{"asset_key":{"type":"string"},"upload":{"type":"object","properties":{"expires_at":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"method":{"type":"string","const":"PUT"},"url":{"type":"string","format":"uri"}},"required":["expires_at","headers","method","url"],"additionalProperties":false}},"required":["asset_key","upload"],"additionalProperties":false,"description":"Direct-upload instructions for one draft media object."}},"securitySchemes":{"browserSession":{"description":"Cookie-backed BetterAuth browser session. Browser `/seller/*` routes also require the normal browser sign-in flow and active workspace context where applicable. API keys do not authenticate browser `/seller/*` routes.","in":"cookie","name":"better-auth.session_token","type":"apiKey"},"sellerApiKey":{"description":"Seller-scoped API key sent in the `x-api-key` header for `/api/seller/*` requests. API keys do not authenticate browser `/seller/*` routes.","in":"header","name":"x-api-key","type":"apiKey"}}}}