{"openapi":"3.1.0","paths":{"/v1/marketplace":{"get":{"description":"Settings are changed in the dashboard, separately for test and live.","operationId":"getMarketplace","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"The marketplace this key belongs to, and its settings","tags":["Marketplace"]}},"/v1/sellers":{"post":{"operationId":"createSeller","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create a seller","tags":["Sellers"]},"get":{"operationId":"listSellers","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"external_id","required":false,"in":"query","description":"Find the seller with this external id.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["active","suspended"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List sellers, newest first","tags":["Sellers"]}},"/v1/sellers/{id}":{"get":{"operationId":"getSeller","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a seller","tags":["Sellers"]},"patch":{"operationId":"updateSeller","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Update a seller","tags":["Sellers"]},"delete":{"description":"Removes the name, external id, metadata, storefront, and review text, and takes the listings down. Orders and reputation stay, without personal data.","operationId":"eraseSeller","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Erase a seller's personal data","tags":["Sellers"]}},"/v1/sellers/{id}/storefront":{"put":{"operationId":"putStorefront","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create or replace a seller's storefront","tags":["Sellers"]}},"/v1/sellers/{id}/onboarding_links":{"post":{"description":"The first link creates the seller's connected account on your Stripe account: Express, with Stripe collecting what the law requires, your platform paying Stripe's fees and bearing losses, and only transfers requested. Send the seller to the link; their payouts status follows as Stripe reports it.","operationId":"createOnboardingLink","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingLinkDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingLinkObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create a Stripe onboarding link for a seller","tags":["Sellers"]}},"/v1/sellers/{id}/profile":{"get":{"description":"Callable with a publishable key. Shows only what a buyer may see.","operationId":"getSellerProfile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerProfileObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"A seller's public profile","tags":["Sellers"],"x-publishable":true}},"/v1/buyers":{"post":{"operationId":"createBuyer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create a buyer","tags":["Buyers"]},"get":{"operationId":"listBuyers","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"external_id","required":false,"in":"query","description":"Find the buyer with this external id.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List buyers, newest first","tags":["Buyers"]}},"/v1/buyers/{id}":{"get":{"operationId":"getBuyer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a buyer","tags":["Buyers"]},"patch":{"operationId":"updateBuyer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Update a buyer","tags":["Buyers"]},"delete":{"operationId":"eraseBuyer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Erase a buyer's personal data","tags":["Buyers"]}},"/v1/categories":{"post":{"operationId":"createCategory","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create a category","tags":["Categories"]},"get":{"operationId":"listCategories","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List categories","tags":["Categories"]}},"/v1/categories/{id}":{"get":{"operationId":"getCategory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a category","tags":["Categories"]},"patch":{"operationId":"updateCategory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Update a category","tags":["Categories"]}},"/v1/categories/{id}/attribute_schema":{"get":{"operationId":"getAttributeSchema","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeSchemaObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"A category's attribute schema","tags":["Categories"]},"put":{"description":"Refused if a listing already in the category would no longer fit.","operationId":"putAttributeSchema","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeSchemaObject"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeSchemaObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Replace a category's attribute schema","tags":["Categories"]}},"/v1/listings":{"post":{"operationId":"createListing","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListingDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create a listing, as a draft","tags":["Listings"]},"get":{"description":"With a publishable key, only published listings are listed.","operationId":"listListings","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"seller","required":false,"in":"query","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["draft","published","sold","expired","removed"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List listings, newest first","tags":["Listings"],"x-publishable":true}},"/v1/listings/bulk":{"post":{"operationId":"createListings","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateListingsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkListingsObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create up to 100 listings at once, all or none","tags":["Listings"]}},"/v1/listings/{id}":{"get":{"description":"With a publishable key, only a published listing can be retrieved.","operationId":"getListing","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a listing","tags":["Listings"],"x-publishable":true},"patch":{"operationId":"updateListing","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Update a listing","tags":["Listings"]}},"/v1/listings/{id}/publish":{"post":{"description":"Needs an active seller, verified when seller verification is on, and a category that is not prohibited.","operationId":"publishListing","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Publish a listing","tags":["Listings"]}},"/v1/listings/{id}/unpublish":{"post":{"operationId":"unpublishListing","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Return a published listing to draft","tags":["Listings"]}},"/v1/listings/{id}/remove":{"post":{"operationId":"removeListing","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveListingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Take a listing down, with a reason","tags":["Listings"]}},"/v1/listings/{id}/media":{"post":{"description":"Returns a signed URL, valid for 10 minutes. PUT the file there, then complete the upload. The file is stored under a path that begins with the marketplace id.","operationId":"createMedia","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUploadObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Start a media upload","tags":["Listings"]},"get":{"operationId":"listMedia","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"A listing's media, pending uploads included","tags":["Listings"]}},"/v1/media/{id}/complete":{"post":{"description":"Checks the stored file against the declared type and size.","operationId":"completeMedia","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Complete a media upload","tags":["Listings"]}},"/v1/media/{id}":{"delete":{"operationId":"deleteMedia","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Delete media and its file","tags":["Listings"]}},"/v1/search/listings":{"get":{"description":"Full text over title and description, with filters and sorting. Only published listings with something available are returned. Callable with a publishable key.","operationId":"searchListings","parameters":[{"name":"q","required":false,"in":"query","description":"Full text over title and description.","schema":{"maxLength":200,"type":"string"}},{"name":"category","required":false,"in":"query","schema":{"type":"string"}},{"name":"seller","required":false,"in":"query","schema":{"type":"string"}},{"name":"min_price","required":false,"in":"query","description":"Minor units.","schema":{"type":"number"}},{"name":"max_price","required":false,"in":"query","description":"Minor units.","schema":{"type":"number"}},{"name":"attributes","required":false,"in":"query","description":"Attribute filters, as attributes[key]=value for equality, or attributes[key][gte]=n and attributes[key][lte]=n for numbers. Numeric filters need a category.","schema":{"additionalProperties":true,"type":"object"}},{"name":"sort","required":false,"in":"query","description":"Relevance needs q. Default newest.","schema":{"type":"string","enum":["relevance","newest","price_asc","price_desc"]}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Search published listings","tags":["Search"],"x-publishable":true}},"/v1/orders":{"post":{"description":"The buyer commits to buy. Quantity is reserved at once. With payments off the order is committed; with payments on it awaits payment.","operationId":"createOrder","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Create an order","tags":["Orders"]},"get":{"operationId":"listOrders","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"buyer","required":false,"in":"query","schema":{"type":"string"}},{"name":"seller","required":false,"in":"query","schema":{"type":"string"}},{"name":"listing","required":false,"in":"query","schema":{"type":"string"}},{"name":"state","required":false,"in":"query","schema":{"type":"string","enum":["awaiting_payment","committed","claimed","disputed","completed","cancelled","expired"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List orders, newest first","tags":["Orders"]}},"/v1/orders/{id}":{"get":{"operationId":"getOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve an order","tags":["Orders"]}},"/v1/orders/{id}/events":{"get":{"operationId":"listOrderEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEventList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"An order's transitions, oldest first","tags":["Orders"]}},"/v1/orders/{id}/claim":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition.","operationId":"claimOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Claim the deal is done (committed to claimed)","tags":["Orders"]}},"/v1/orders/{id}/confirm":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition.","operationId":"confirmOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Confirm a claim (claimed to completed), by the party who did not claim","tags":["Orders"]}},"/v1/orders/{id}/back_out":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition. Writes a backed_out reputation event against the actor.","operationId":"backOutOfOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Back out (committed to cancelled)","tags":["Orders"]}},"/v1/orders/{id}/propose_cancel":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition. The other party can accept within the agreement window. A declined or lapsed proposal changes nothing.","operationId":"proposeCancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Propose cancelling by agreement","tags":["Orders"]}},"/v1/orders/{id}/accept_cancel":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition.","operationId":"acceptCancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Accept a proposal to cancel (committed to cancelled, reason mutual)","tags":["Orders"]}},"/v1/orders/{id}/decline_cancel":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition.","operationId":"declineCancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Decline a proposal to cancel. The order stays committed.","tags":["Orders"]}},"/v1/orders/{id}/reviews":{"post":{"description":"Called from your server. `actor` says which end user is acting; we check they are a party to the order and may make this transition. Only on a completed order, inside the review window, once per party. Hidden until both have reviewed or the window closes.","operationId":"createReview","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Review the other party","tags":["Orders"]},"get":{"operationId":"listOrderReviews","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"An order's reviews","tags":["Orders"]}},"/v1/reviews":{"get":{"operationId":"listReviews","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"subject","required":true,"in":"query","description":"The buyer or seller the reviews are about.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Visible reviews about a buyer or a seller","tags":["Reviews"]}},"/v1/reviews/{id}":{"get":{"operationId":"getReview","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a review","tags":["Reviews"]}},"/v1/reputation_events":{"get":{"operationId":"listReputationEvents","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"party","required":true,"in":"query","description":"The buyer or seller whose events to list.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReputationEventList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"A buyer's or a seller's reputation events, newest first","tags":["Reputation"]}},"/v1/reputation_events/{id}/void":{"post":{"description":"For the customer's team. Writes a second event pointing at the first. The voided event stops counting. Nothing is deleted.","operationId":"voidReputationEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReputationEventObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Void a reputation event, with a written reason","tags":["Reputation"]}},"/v1/payments":{"get":{"operationId":"listPayments","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"order","required":false,"in":"query","description":"Only the payment for this order.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["awaiting_payment","succeeded","canceled"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List payments, newest first","tags":["Payments"]}},"/v1/payments/{id}":{"get":{"operationId":"getPayment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a payment","tags":["Payments"]},"patch":{"operationId":"updatePayment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMetadataDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Replace a payment's metadata","tags":["Payments"]}},"/v1/payments/{id}/retry_release":{"post":{"description":"For a release that failed, for example because the seller could not yet receive transfers. A release is also tried again by itself when the seller becomes able to receive payouts.","operationId":"retryPaymentRelease","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Try a failed release of the seller's share again","tags":["Payments"]}},"/v1/refunds":{"post":{"description":"Recorded at once with status `pending`, then made at Stripe. If the seller's share was already released, the transfer is reversed in the same proportion, so your fee is given back in proportion too.","operationId":"createRefund","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Refund a payment, in full or in part","tags":["Payments"]},"get":{"operationId":"listRefunds","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"payment","required":false,"in":"query","schema":{"type":"string"}},{"name":"order","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List refunds, newest first","tags":["Payments"]}},"/v1/refunds/{id}":{"get":{"operationId":"getRefund","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a refund","tags":["Payments"]},"patch":{"operationId":"updateRefund","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMetadataDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Replace a refund's metadata","tags":["Payments"]}},"/v1/sellers/{id}/verifications":{"post":{"description":"Creates a Stripe Identity session on your Stripe account and returns its page, once. Only the outcome and the session id are kept; no document image or document data. When seller verification is on, a seller can publish only once verified.","operationId":"createVerification","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVerificationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Start a seller's identity verification","tags":["Trust"]}},"/v1/verifications":{"get":{"operationId":"listVerifications","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"seller","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List identity verifications, newest first","tags":["Trust"]}},"/v1/verifications/{id}":{"get":{"operationId":"getVerification","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve an identity verification","tags":["Trust"]}},"/v1/verifications/{id}/cancel":{"post":{"operationId":"cancelVerification","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Cancel a verification the seller has not submitted","tags":["Trust"]}},"/v1/disputes":{"get":{"description":"Filter by `stage` for a queue.","operationId":"listDisputes","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"stage","required":false,"in":"query","schema":{"type":"string","enum":["evidence","awaiting_decision","decided"]}},{"name":"order","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List disputes, newest first","tags":["Trust"]}},"/v1/disputes/{id}":{"get":{"operationId":"getDispute","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a dispute","tags":["Trust"]}},"/v1/disputes/{id}/evidence":{"post":{"description":"Only while the dispute is in its evidence stage.","operationId":"addDisputeEvidence","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEvidenceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeEvidenceObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Add evidence from one side","tags":["Trust"]},"get":{"operationId":"listDisputeEvidence","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeEvidenceList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"A dispute's evidence, oldest first","tags":["Trust"]}},"/v1/disputes/{id}/close_evidence":{"post":{"operationId":"closeDisputeEvidence","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"End the evidence stage early","tags":["Trust"]}},"/v1/disputes/{id}/decide":{"post":{"description":"Your team's decision: who it went against, in writing, and with payments on, how much goes back to the buyer. On a claimed order, deciding against the party who disputed upholds the claim and completes the order; deciding against the claimant cancels it.","operationId":"decideDispute","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideDisputeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Decide a dispute","tags":["Trust"]}},"/v1/orders/{id}/disputes":{"post":{"description":"On a claimed order, by the party who did not claim: the order becomes disputed. On a completed order, by either party inside the dispute window: the order stays completed.","operationId":"openDispute","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenDisputeDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisputeObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not allowed with this key, or the marketplace is read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Dispute an order","tags":["Trust"]}},"/v1/flags":{"post":{"description":"On behalf of the end user who reported it.","operationId":"createFlag","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlagDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Flag a listing, a seller, or a review","tags":["Moderation"]},"get":{"operationId":"listFlags","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["open","resolved"]}},{"name":"target","required":false,"in":"query","description":"Only flags on this listing, seller, or review.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List flags, newest first","tags":["Moderation"]}},"/v1/flags/{id}":{"get":{"operationId":"getFlag","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a flag","tags":["Moderation"]}},"/v1/moderation/queue":{"get":{"operationId":"getModerationQueue","parameters":[{"name":"target_type","required":false,"in":"query","schema":{"type":"string","enum":["listing","seller","review"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationQueueObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"The review queue: everything with open flags, the longest waiting first","tags":["Moderation"]}},"/v1/moderation/actions":{"post":{"description":"Resolves the target's open flags and logs who acted and why.","operationId":"createModerationAction","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModerationActionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationActionObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Act on a flagged target","tags":["Moderation"]},"get":{"operationId":"listModerationActions","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"target","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationActionList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"The moderation log, newest first","tags":["Moderation"]}},"/v1/webhook_endpoints":{"post":{"description":"Returns the signing secret, once. Every delivery carries `MarketSDK-Signature: t=<time>,v1=<HMAC-SHA256 of \"<time>.<body>\">`.","operationId":"createWebhookEndpoint","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Register a webhook endpoint","tags":["Webhooks"]},"get":{"operationId":"listWebhookEndpoints","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"List webhook endpoints","tags":["Webhooks"]}},"/v1/webhook_endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a webhook endpoint","tags":["Webhooks"]},"patch":{"operationId":"updateWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Update a webhook endpoint, or turn it off and on","tags":["Webhooks"]},"delete":{"operationId":"deleteWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedWebhookEndpointObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Delete a webhook endpoint and its deliveries","tags":["Webhooks"]}},"/v1/webhook_endpoints/{id}/rotate_secret":{"post":{"description":"Returns the new secret, once. The old one stops at once.","operationId":"rotateWebhookSecret","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Replace the signing secret","tags":["Webhooks"]}},"/v1/webhook_deliveries":{"get":{"operationId":"listWebhookDeliveries","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"endpoint","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["pending","succeeded","failed"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Recent deliveries, newest first, with request and response","tags":["Webhooks"]}},"/v1/webhook_deliveries/{id}":{"get":{"operationId":"getWebhookDelivery","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve a delivery","tags":["Webhooks"]}},"/v1/webhook_deliveries/{id}/replay":{"post":{"description":"Creates a new delivery of the same event to the same endpoint.","operationId":"replayWebhookDelivery","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The object is not in a state that allows this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Send a delivery again","tags":["Webhooks"]}},"/v1/events":{"get":{"operationId":"listEvents","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"starting_after","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["seller.created","seller.updated","seller.erased","seller.suspended","seller.unsuspended","seller.verification_updated","seller.payouts_updated","buyer.created","buyer.updated","buyer.erased","category.created","category.updated","listing.created","listing.updated","listing.published","listing.unpublished","listing.sold","listing.expired","listing.removed","media.ready","media.deleted","order.created","order.committed","order.claimed","order.cancellation_proposed","order.cancellation_declined","order.cancelled","order.expired","order.completed","order.disputed","payment.created","payment.succeeded","payment.failed","payment.canceled","payment.refunded","payment.released","payment.release_failed","refund.created","refund.updated","verification.created","verification.updated","review.created","review.visible","review.removed","reputation_event.created","reputation_event.voided","dispute.created","dispute.evidence_added","dispute.updated","dispute.decision_overdue","dispute.decided","card_dispute.created","card_dispute.updated","flag.created","flag.resolved","moderation_action.created"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Events, newest first: every state change on every resource","tags":["Webhooks"]}},"/v1/events/{id}":{"get":{"operationId":"getEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventObject"}}}},"400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"No API key, or not a valid one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No object with that id in this marketplace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited. See `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"summary":"Retrieve an event","tags":["Webhooks"]}}},"info":{"title":"MarketSDK API","description":"A headless API for a peer-to-peer marketplace inside your product.\n\nAuthenticate with `Authorization: Bearer <api key>`. The key alone decides the marketplace and the mode: `msk_test_` keys reach test mode, `msk_live_` keys live mode, and data never crosses.\n\nEvery POST accepts `Idempotency-Key`; a repeat within 24 hours returns the original response. Lists are cursor-based. Money is integer minor units with an ISO currency code. Timestamps are ISO 8601 in UTC. Errors share one envelope with a `request_id`.\n\nAbuse reports: report@marketsdk.com.","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"https://api.marketsdk.com"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"An API key: msk_test_sk_…, msk_live_sk_…, or a publishable msk_…_pk_… key where allowed."}},"schemas":{"ErrorBody":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable. Never changes once published.","example":"resource_missing"},"message":{"type":"string","description":"For people.","example":"No seller has that id."},"param":{"type":"string","description":"The request field at fault.","example":"seller"},"request_id":{"type":"string","example":"req_7Gq0mR2s9xVbN4kT1pLc"}},"required":["code","message","request_id"]},"ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"]},"FeeSettingsDto":{"type":"object","properties":{"percent_bps":{"type":"number","minimum":0,"maximum":10000,"description":"Basis points: 250 is 2.5 percent."},"fixed_amount":{"type":"number","minimum":0,"description":"Minor units, in the marketplace currency."}}},"TimerSettingsDto":{"type":"object","properties":{"payment_window_minutes":{"type":"number","minimum":5,"maximum":1440,"default":30},"commitment_window_days":{"type":"number","minimum":1,"maximum":90,"default":14},"agreement_window_hours":{"type":"number","minimum":1,"maximum":168,"default":48},"confirmation_window_days":{"type":"number","minimum":1,"maximum":30,"default":7},"review_window_days":{"type":"number","minimum":7,"maximum":90,"default":30},"dispute_window_days":{"type":"number","minimum":0,"maximum":60,"default":14}}},"ReputationSettingsDto":{"type":"object","properties":{"window_months":{"type":"number","minimum":6,"maximum":60,"default":24},"backout_weight":{"type":"number","minimum":1,"maximum":5,"default":2},"dispute_weight":{"type":"number","minimum":1,"maximum":5,"default":3},"blend":{"type":"number","minimum":0,"maximum":1,"default":0.6},"prior_rating":{"type":"number","minimum":3,"maximum":5,"default":4},"prior_weight":{"type":"number","minimum":0,"maximum":10,"default":2},"minimum_events":{"type":"number","minimum":1,"maximum":10,"default":3}}},"DisputeSettingsDto":{"type":"object","properties":{"evidence_days":{"type":"number","minimum":1,"maximum":30,"default":7,"description":"Days both parties have to give evidence once a dispute opens."},"decision_days":{"type":"number","minimum":1,"maximum":60,"default":14,"description":"Days the customer's team has to decide once evidence closes. After that the dispute is marked overdue."}}},"ModerationSettingsDto":{"type":"object","properties":{"prohibited_keywords":{"maxItems":200,"description":"Words or phrases that block publication when found in a listing title or description, ignoring case.","type":"array","items":{"type":"string"}}}},"ReadOnlyObject":{"type":"object","properties":{"reason":{"type":"string","enum":["payment_failed","cancelled","plan_inactive","policy_not_accepted","stripe_connection","suspended"]},"since":{"type":"string","format":"date-time"}},"required":["reason","since"]},"MarketplaceObject":{"type":"object","properties":{"object":{"type":"string","enum":["marketplace"]},"id":{"type":"string","example":"mkt_034XtPDs7UJ0TXzTsdaHZa"},"mode":{"type":"string","enum":["test","live"]},"description":{"type":["string","null"]},"currency":{"type":"string","example":"USD"},"payments":{"type":"boolean"},"seller_verification":{"type":"boolean"},"hold_funds_until_completion":{"type":"boolean"},"fee":{"$ref":"#/components/schemas/FeeSettingsDto"},"timers":{"$ref":"#/components/schemas/TimerSettingsDto"},"reputation":{"$ref":"#/components/schemas/ReputationSettingsDto"},"disputes":{"$ref":"#/components/schemas/DisputeSettingsDto"},"moderation":{"$ref":"#/components/schemas/ModerationSettingsDto"},"allowed_origins":{"type":"array","items":{"type":"string"}},"read_only":{"description":"Set while the marketplace answers reads only, for example after a missed payment. Changes are refused with 403 `marketplace_read_only`. Null when open.","anyOf":[{"$ref":"#/components/schemas/ReadOnlyObject"},{"type":"null"}]}},"required":["object","id","mode","description","currency","payments","seller_verification","hold_funds_until_completion","fee","timers","reputation","disputes","moderation","allowed_origins","read_only"]},"CreatePartyDto":{"type":"object","properties":{"external_id":{"type":"string","description":"Your own id for this person. Unique per marketplace.","maxLength":200},"display_name":{"type":"string","maxLength":200},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["external_id"]},"SellerVerificationSummary":{"type":"object","properties":{"status":{"type":"string","enum":["unverified","pending","verified","requires_input","canceled"],"description":"From the latest identity verification. Once verified, a seller stays verified."},"verified_at":{"type":["string","null"],"format":"date-time"}},"required":["status","verified_at"]},"SellerPayoutsObject":{"type":"object","properties":{"status":{"type":"string","enum":["not_started","pending","enabled","restricted"],"description":"`not_started` before the first onboarding link; `pending` while Stripe onboarding is unfinished or under review; `enabled` when the seller can receive transfers; `restricted` when Stripe needs more from the seller."},"requirements_due":{"description":"What Stripe still needs from the seller, by Stripe's field names. Send a new onboarding link to collect it.","type":"array","items":{"type":"string"}},"stripe_account":{"type":["string","null"],"description":"The seller's connected account on your Stripe account."}},"required":["status","requirements_due","stripe_account"]},"StorefrontObject":{"type":"object","properties":{"object":{"type":"string","enum":["storefront"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"}},"required":["object","name","slug","description","metadata","updated_at"]},"ReputationObject":{"type":"object","properties":{"completed_orders":{"type":"number","description":"order_completed events in the rolling window."},"backed_out":{"type":"number","description":"backed_out events in the rolling window."},"disputes_lost":{"type":"number","description":"dispute_lost events in the rolling window."},"review_count":{"type":"number","description":"Visible reviews in the rolling window."},"average_rating":{"type":["number","null"],"description":"Plain mean of those ratings, or null."},"score":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Null until the minimum number of events."},"level":{"type":"string","enum":["new","low","fair","good","excellent"]}},"required":["completed_orders","backed_out","disputes_lost","review_count","average_rating","score","level"]},"SellerObject":{"type":"object","properties":{"object":{"type":"string","enum":["seller"]},"id":{"type":"string","example":"sel_034XtPDs7UJ0TXzTsdaHZa"},"external_id":{"type":"string"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended"]},"suspended_reason":{"type":["string","null"]},"verification":{"$ref":"#/components/schemas/SellerVerificationSummary"},"payouts":{"$ref":"#/components/schemas/SellerPayoutsObject"},"storefront":{"anyOf":[{"$ref":"#/components/schemas/StorefrontObject"},{"type":"null"}]},"reputation":{"$ref":"#/components/schemas/ReputationObject"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"erased":{"type":"boolean","description":"True once the seller's personal data has been erased at your request."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","external_id","display_name","status","suspended_reason","verification","payouts","storefront","reputation","metadata","erased","created_at","updated_at"]},"SellerList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SellerObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"UpdatePartyDto":{"type":"object","properties":{"display_name":{"type":["string","null"],"maxLength":200},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}},"StorefrontDto":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"slug":{"type":"string","description":"Lowercase letters, digits, and hyphens. Unique per marketplace.","example":"jane-templates"},"description":{"type":["string","null"],"maxLength":5000},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","slug"]},"OnboardingLinkDto":{"type":"object","properties":{"return_url":{"type":"string","description":"Where Stripe sends the seller when they finish or leave onboarding."},"refresh_url":{"type":"string","description":"Where Stripe sends the seller if the link expired. Create a new link there."},"country":{"type":"string","description":"The seller's country, two letters. Used only when the seller's Stripe account is created, on the first link. Defaults to your Stripe account's country.","example":"US"}},"required":["return_url","refresh_url"]},"OnboardingLinkObject":{"type":"object","properties":{"object":{"type":"string","enum":["onboarding_link"]},"seller":{"type":"string"},"url":{"type":"string","description":"Stripe-hosted onboarding, carrying your branding. Single use, and short-lived."},"expires_at":{"type":"string","format":"date-time"},"payouts":{"$ref":"#/components/schemas/SellerPayoutsObject"}},"required":["object","seller","url","expires_at","payouts"]},"SellerProfileObject":{"type":"object","properties":{"object":{"type":"string","enum":["seller_profile"]},"id":{"type":"string"},"display_name":{"type":["string","null"]},"verification_status":{"type":"string","enum":["unverified","pending","verified","requires_input","canceled"]},"storefront":{"anyOf":[{"$ref":"#/components/schemas/StorefrontObject"},{"type":"null"}]},"reputation":{"$ref":"#/components/schemas/ReputationObject"}},"required":["object","id","display_name","verification_status","storefront","reputation"]},"BuyerObject":{"type":"object","properties":{"object":{"type":"string","enum":["buyer"]},"id":{"type":"string","example":"buy_034XtPDs7UJ0TXzTsdaHZa"},"external_id":{"type":"string"},"display_name":{"type":["string","null"]},"reputation":{"$ref":"#/components/schemas/ReputationObject"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"erased":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","external_id","display_name","reputation","metadata","erased","created_at","updated_at"]},"BuyerList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BuyerObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"AttributeDefinitionObject":{"type":"object","properties":{"key":{"type":"string","example":"format"},"label":{"type":"string"},"type":{"type":"string","enum":["string","number","integer","boolean","enum"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"min":{"type":"number"},"max":{"type":"number"},"max_length":{"type":"number"}},"required":["key","type"]},"AttributeSchemaObject":{"type":"object","properties":{"attributes":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/AttributeDefinitionObject"}}},"required":["attributes"]},"CategoryFeeDto":{"type":"object","properties":{"percent_bps":{"type":["number","null"],"minimum":0,"maximum":10000,"description":"Basis points: 250 is 2.5 percent."},"fixed_amount":{"type":["number","null"],"minimum":0,"description":"Minor units, in the marketplace currency."}}},"CreateCategoryDto":{"type":"object","properties":{"key":{"type":"string","description":"Your key for the category. Unique per marketplace.","example":"ui-kits"},"name":{"type":"string","maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"parent":{"type":["string","null"],"description":"Another category of this marketplace."},"attribute_schema":{"$ref":"#/components/schemas/AttributeSchemaObject"},"fee":{"description":"Overrides the marketplace's platform fee for listings in this category. Null uses the marketplace fee.","anyOf":[{"$ref":"#/components/schemas/CategoryFeeDto"},{"type":"null"}]},"prohibited":{"type":"boolean","default":false,"description":"Listings in a prohibited category cannot be published (section 9.4)."}},"required":["key","name"]},"CategoryObject":{"type":"object","properties":{"object":{"type":"string","enum":["category"]},"id":{"type":"string","example":"cat_034XtPDs7UJ0TXzTsdaHZa"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"parent":{"type":["string","null"]},"attribute_schema":{"$ref":"#/components/schemas/AttributeSchemaObject"},"fee":{"anyOf":[{"$ref":"#/components/schemas/CategoryFeeDto"},{"type":"null"}]},"prohibited":{"type":"boolean","description":"Listings in a prohibited category cannot be published."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","key","name","description","parent","attribute_schema","fee","prohibited","created_at","updated_at"]},"CategoryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CategoryObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"UpdateCategoryDto":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":["string","null"]},"parent":{"type":["string","null"]},"fee":{"anyOf":[{"$ref":"#/components/schemas/CategoryFeeDto"},{"type":"null"}]},"prohibited":{"type":"boolean","description":"Listings in a prohibited category cannot be published. Listings already published stay until moderated."}}},"MoneyDto":{"type":"object","properties":{"amount":{"type":"number","description":"Integer minor units, such as cents.","example":4900},"currency":{"type":"string","description":"ISO 4217 code. Must be the marketplace currency.","example":"USD"}},"required":["amount","currency"]},"CreateListingDto":{"type":"object","properties":{"seller":{"type":"string","example":"sel_034XtPDs7UJ0TXzTsdaHZa"},"category":{"type":["string","null"],"example":"cat_034XtPDs7UJ0TXzTsdaHZa"},"title":{"type":"string","maxLength":200},"description":{"type":["string","null"],"maxLength":20000},"price":{"$ref":"#/components/schemas/MoneyDto"},"quantity":{"type":"number","default":1,"minimum":1,"maximum":100000},"attributes":{"type":"object","description":"Validated against the category's attribute schema.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time","description":"When a published listing expires."}},"required":["seller","title","price"]},"MoneyObject":{"type":"object","properties":{"amount":{"type":"number","description":"Integer minor units.","example":4900},"currency":{"type":"string","example":"USD"}},"required":["amount","currency"]},"MediaObject":{"type":"object","properties":{"object":{"type":"string","enum":["media"]},"id":{"type":"string","example":"med_034XtPDs7UJ0TXzTsdaHZa"},"listing":{"type":"string"},"status":{"type":"string","enum":["pending","ready"]},"content_type":{"type":"string","example":"image/jpeg"},"size_bytes":{"type":"number"},"position":{"type":"number"},"url":{"type":["string","null"],"description":"A signed link to the file, valid for an hour. Null until the upload completes."},"url_expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","listing","status","content_type","size_bytes","position","url","url_expires_at","created_at"]},"ListingObject":{"type":"object","properties":{"object":{"type":"string","enum":["listing"]},"id":{"type":"string","example":"lst_034XtPDs7UJ0TXzTsdaHZa"},"seller":{"type":"string"},"category":{"type":["string","null"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/MoneyObject"},"quantity":{"type":"number"},"quantity_available":{"type":"number","description":"Not reserved by an open order."},"status":{"type":"string","enum":["draft","published","sold","expired","removed"]},"attributes":{"type":"object","additionalProperties":true},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaObject"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"published_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"removed_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","seller","category","title","description","price","quantity","quantity_available","status","attributes","media","metadata","published_at","expires_at","removed_reason","created_at","updated_at"]},"BulkCreateListingsDto":{"type":"object","properties":{"listings":{"minItems":1,"maxItems":100,"description":"All are created, or none.","type":"array","items":{"$ref":"#/components/schemas/CreateListingDto"}}},"required":["listings"]},"BulkListingsObject":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ListingObject"}}},"required":["object","data"]},"ListingList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ListingObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"UpdateListingDto":{"type":"object","properties":{"category":{"type":["string","null"]},"title":{"type":"string","maxLength":200},"description":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/MoneyDto"},"quantity":{"type":"number","minimum":1,"description":"The total. Cannot go below what open orders have reserved."},"attributes":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}}},"RemoveListingDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Recorded with the removal."}},"required":["reason"]},"CreateMediaDto":{"type":"object","properties":{"content_type":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","image/avif"]},"size_bytes":{"type":"number","minimum":1,"maximum":10485760,"description":"The exact size of the file, in bytes. At most 10 MB."},"position":{"type":"number","default":0}},"required":["content_type","size_bytes"]},"MediaUploadObject":{"type":"object","properties":{"media":{"$ref":"#/components/schemas/MediaObject"},"upload_url":{"type":"string","description":"PUT the file here, with the same Content-Type, within 10 minutes. Then complete the upload."},"upload_expires_at":{"type":"string","format":"date-time"}},"required":["media","upload_url","upload_expires_at"]},"MediaList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/MediaObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"CheckoutUrlsDto":{"type":"object","properties":{"success_url":{"type":"string","description":"Where Stripe sends the buyer after paying."},"cancel_url":{"type":"string","description":"Where Stripe sends the buyer if they go back."}},"required":["success_url","cancel_url"]},"CreateOrderDto":{"type":"object","properties":{"listing":{"type":"string","example":"lst_034XtPDs7UJ0TXzTsdaHZa"},"buyer":{"type":"string","description":"The buyer placing the order. The actor for this transition.","example":"buy_034XtPDs7UJ0TXzTsdaHZa"},"quantity":{"type":"number","default":1,"minimum":1},"checkout":{"description":"Payments on only. With these, the order's payment includes a Stripe-hosted checkout URL; without them, a client secret for Stripe Elements on your own page.","allOf":[{"$ref":"#/components/schemas/CheckoutUrlsDto"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["listing","buyer"]},"OrderPriceObject":{"type":"object","properties":{"unit_amount":{"type":"number","description":"Per unit, fixed when the order was created. Minor units."},"amount":{"type":"number","description":"unit_amount times quantity. Minor units."},"currency":{"type":"string","example":"USD"}},"required":["unit_amount","amount","currency"]},"OrderPaymentObject":{"type":"object","properties":{"id":{"type":"string","example":"pay_034XtPDs7UJ0TXzTsdaHZa"},"status":{"type":"string","enum":["awaiting_payment","succeeded","canceled"]},"checkout_url":{"type":["string","null"],"description":"Stripe-hosted checkout, when checkout URLs were given."},"client_secret":{"type":["string","null"],"description":"For Stripe Elements on your own page, with your own Stripe publishable key."},"amount_refunded":{"type":"number","description":"Refunded so far. Minor units."},"amount_released":{"type":"number","description":"Released to the seller so far. Minor units."},"release_status":{"type":["string","null"],"enum":["held","releasing","released","failed","nothing_to_release",null],"description":"Null until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment."}},"required":["id","status","checkout_url","client_secret","amount_refunded","amount_released","release_status"]},"CancellationProposalObject":{"type":"object","properties":{"proposed_by":{"type":"string","enum":["buyer","seller"]},"expires_at":{"type":"string","format":"date-time","description":"The proposal lapses after this. A lapsed or declined proposal changes nothing."}},"required":["proposed_by","expires_at"]},"OrderObject":{"type":"object","properties":{"object":{"type":"string","enum":["order"]},"id":{"type":"string","example":"ord_034XtPDs7UJ0TXzTsdaHZa"},"listing":{"type":"string"},"buyer":{"type":"string"},"seller":{"type":"string"},"quantity":{"type":"number"},"price":{"$ref":"#/components/schemas/OrderPriceObject"},"fee":{"description":"The customer's platform fee, fixed when the order was created.","allOf":[{"$ref":"#/components/schemas/MoneyObject"}]},"payments":{"type":"boolean","description":"Whether payments were on when the order was created."},"payment":{"anyOf":[{"$ref":"#/components/schemas/OrderPaymentObject"},{"type":"null"}]},"state":{"type":"string","enum":["awaiting_payment","committed","claimed","disputed","completed","cancelled","expired"]},"state_reason":{"type":["string","null"],"enum":["payment_expired","backed_out","mutual","auto_confirmed","dispute",null]},"claimed_by":{"type":["string","null"],"enum":["buyer","seller",null]},"cancellation_proposal":{"anyOf":[{"$ref":"#/components/schemas/CancellationProposalObject"},{"type":"null"}]},"timer_expires_at":{"type":["string","null"],"format":"date-time","description":"When the current state's timer passes."},"completed_at":{"type":["string","null"],"format":"date-time"},"review_window_closes_at":{"type":["string","null"],"format":"date-time"},"dispute_window_closes_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","listing","buyer","seller","quantity","price","fee","payments","payment","state","state_reason","claimed_by","cancellation_proposal","timer_expires_at","completed_at","review_window_closes_at","dispute_window_closes_at","metadata","created_at","updated_at"]},"OrderList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"OrderEventObject":{"type":"object","properties":{"object":{"type":"string","enum":["order_event"]},"id":{"type":"string","example":"oev_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string"},"sequence":{"type":"number"},"from_state":{"type":["string","null"]},"to_state":{"type":"string"},"actor_type":{"type":"string","enum":["buyer","seller","system","customer"]},"actor":{"type":["string","null"]},"reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","order","sequence","from_state","to_state","actor_type","actor","reason","created_at"]},"OrderEventList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderEventObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"ActorDto":{"type":"object","properties":{"actor":{"type":"string","description":"The buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.","example":"buy_034XtPDs7UJ0TXzTsdaHZa"}},"required":["actor"]},"CreateReviewDto":{"type":"object","properties":{"actor":{"type":"string","description":"The buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.","example":"buy_034XtPDs7UJ0TXzTsdaHZa"},"rating":{"type":"number","minimum":1,"maximum":5},"body":{"type":"string","maxLength":5000}},"required":["actor","rating"]},"ReviewObject":{"type":"object","properties":{"object":{"type":"string","enum":["review"]},"id":{"type":"string","example":"rev_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string"},"author_role":{"type":"string","enum":["buyer","seller"]},"author":{"type":"string"},"subject":{"type":"string"},"visible":{"type":"boolean","description":"False until both parties have reviewed or the review window has closed. Rating and body are withheld until then."},"rating":{"type":["number","null"],"minimum":1,"maximum":5},"body":{"type":["string","null"]},"removed":{"type":"boolean","description":"Removed by moderation. A removed review stops counting toward reputation."},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","order","author_role","author","subject","visible","rating","body","removed","created_at"]},"ReviewList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"ReputationEventObject":{"type":"object","properties":{"object":{"type":"string","enum":["reputation_event"]},"id":{"type":"string","example":"rep_034XtPDs7UJ0TXzTsdaHZa"},"party":{"type":"string","description":"The buyer or seller the event belongs to."},"party_role":{"type":"string","enum":["buyer","seller"]},"kind":{"type":"string","enum":["order_completed","backed_out","dispute_lost","dispute_won","lapsed","review_received","voided"]},"order":{"type":["string","null"]},"review":{"type":["string","null"]},"rating":{"type":["number","null"],"description":"For review_received."},"voids":{"type":["string","null"],"description":"For voided: the event this one voids."},"reason":{"type":["string","null"],"description":"For voided: the written reason."},"occurred_at":{"type":"string","format":"date-time"}},"required":["object","id","party","party_role","kind","order","review","rating","voids","reason","occurred_at"]},"ReputationEventList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReputationEventObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"VoidDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000,"description":"Why the event is voided. Recorded on the voiding event."}},"required":["reason"]},"PaymentReleaseObject":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["held","releasing","released","failed","nothing_to_release",null],"description":"Null until the buyer pays."},"amount":{"type":"number","description":"Transferred to the seller's Stripe account. Minor units."},"amount_reversed":{"type":"number","description":"Taken back from the seller for refunds after release. Minor units."},"failure":{"type":["string","null"]},"released_at":{"type":["string","null"],"format":"date-time"}},"required":["status","amount","amount_reversed","failure","released_at"]},"PaymentStripeObject":{"type":"object","properties":{"payment_intent":{"type":["string","null"]},"checkout_session":{"type":["string","null"]},"charge":{"type":["string","null"]},"transfer":{"type":["string","null"]}},"required":["payment_intent","checkout_session","charge","transfer"]},"PaymentObject":{"type":"object","properties":{"object":{"type":"string","enum":["payment"]},"id":{"type":"string","example":"pay_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string"},"method":{"type":"string","enum":["checkout_session","payment_intent"]},"status":{"type":"string","enum":["awaiting_payment","succeeded","canceled"]},"amount":{"type":"number","description":"Minor units."},"fee_amount":{"type":"number","description":"The customer's platform fee. Minor units."},"currency":{"type":"string","example":"USD"},"checkout_url":{"type":["string","null"],"description":"Stripe-hosted checkout. Shown only while payment is due."},"client_secret":{"type":["string","null"],"description":"For Stripe Elements on your own page. Shown only while payment is due."},"last_failure":{"type":["string","null"],"description":"Stripe's message for the last failed attempt to pay."},"amount_refunded":{"type":"number","description":"Refunded or being refunded. Minor units."},"release":{"$ref":"#/components/schemas/PaymentReleaseObject"},"stripe":{"description":"Ids of the objects on your Stripe account.","allOf":[{"$ref":"#/components/schemas/PaymentStripeObject"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"paid_at":{"type":["string","null"],"format":"date-time"},"canceled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","order","method","status","amount","fee_amount","currency","checkout_url","client_secret","last_failure","amount_refunded","release","stripe","metadata","paid_at","canceled_at","created_at","updated_at"]},"PaymentList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"UpdateMetadataDto":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["metadata"]},"CreateRefundDto":{"type":"object","properties":{"payment":{"type":"string","description":"The payment to refund. Give this or `order`.","example":"pay_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string","description":"The order whose payment to refund. Give this or `payment`.","example":"ord_034XtPDs7UJ0TXzTsdaHZa"},"amount":{"type":"number","description":"Minor units. Defaults to everything not yet refunded.","minimum":1},"reason":{"type":"string","enum":["requested_by_customer","duplicate","fraudulent"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}},"RefundReversalObject":{"type":"object","properties":{"amount":{"type":"number","description":"Taken back from the seller's transfer. Minor units."}},"required":["amount"]},"RefundStripeObject":{"type":"object","properties":{"refund":{"type":["string","null"]},"transfer_reversal":{"type":["string","null"]}},"required":["refund","transfer_reversal"]},"RefundObject":{"type":"object","properties":{"object":{"type":"string","enum":["refund"]},"id":{"type":"string","example":"ref_034XtPDs7UJ0TXzTsdaHZa"},"payment":{"type":"string"},"order":{"type":"string"},"amount":{"type":"number","description":"Minor units."},"currency":{"type":"string","example":"USD"},"reason":{"type":["string","null"],"enum":["requested_by_customer","duplicate","fraudulent",null]},"initiated_by":{"type":"string","enum":["api","order_cancelled","order_expired","late_payment","stripe"],"description":"`api` for a refund you asked for; `order_cancelled` and `order_expired` when an order ended without completing; `late_payment` for a payment that arrived after its order lapsed; `stripe` for a refund made in the Stripe dashboard, which does not reverse the transfer."},"status":{"type":"string","enum":["pending","succeeded","failed","canceled"]},"failure_reason":{"type":["string","null"]},"transfer_reversal":{"description":"Present when the refund came after release.","anyOf":[{"$ref":"#/components/schemas/RefundReversalObject"},{"type":"null"}]},"stripe":{"$ref":"#/components/schemas/RefundStripeObject"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","payment","order","amount","currency","reason","initiated_by","status","failure_reason","transfer_reversal","stripe","metadata","created_at","updated_at"]},"RefundList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RefundObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"CreateVerificationDto":{"type":"object","properties":{"return_url":{"type":"string","description":"Where Stripe sends the seller after the verification page."}}},"VerificationObject":{"type":"object","properties":{"object":{"type":"string","enum":["verification"]},"id":{"type":"string","example":"ver_034XtPDs7UJ0TXzTsdaHZa"},"seller":{"type":"string"},"status":{"type":"string","enum":["requires_input","processing","verified","canceled"],"description":"Stripe Identity's status for this attempt. `requires_input` with a `last_error_code` means the seller must try again."},"last_error_code":{"type":["string","null"],"description":"Stripe's reason the last attempt failed, such as `document_expired`."},"url":{"type":["string","null"],"description":"The Stripe-hosted verification page. Returned only when the verification is created. Send the seller there."},"stripe_session":{"type":["string","null"],"description":"The Stripe Identity verification session."},"verified_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","seller","status","last_error_code","url","stripe_session","verified_at","created_at","updated_at"]},"VerificationList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/VerificationObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"DisputeDecisionObject":{"type":"object","properties":{"against":{"type":"string","enum":["buyer","seller"]},"outcome":{"type":"string","enum":["claim_upheld","claim_rejected","decided"],"description":"`decided` for a dispute on a completed order, which has no claim to uphold."},"refund_amount":{"type":["number","null"],"description":"Refunded to the buyer by this decision. Null with payments off."},"note":{"type":"string"},"decided_by":{"type":["string","null"]},"decided_at":{"type":"string","format":"date-time"}},"required":["against","outcome","refund_amount","note","decided_by","decided_at"]},"CardDisputeObject":{"type":"object","properties":{"object":{"type":"string","enum":["card_dispute"]},"id":{"type":"string","example":"cdp_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string"},"stripe_dispute":{"type":"string","description":"The dispute's id on your Stripe account."},"amount":{"type":"number"},"currency":{"type":"string"},"reason":{"type":"string"},"status":{"type":"string","description":"Stripe's status, such as needs_response, won, or lost."},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","order","stripe_dispute","amount","currency","reason","status","created_at"]},"DisputeObject":{"type":"object","properties":{"object":{"type":"string","enum":["dispute"]},"id":{"type":"string","example":"dsp_034XtPDs7UJ0TXzTsdaHZa"},"order":{"type":"string"},"kind":{"type":"string","enum":["claimed_order","completed_order"]},"opened_by":{"type":"string","enum":["buyer","seller"]},"opener":{"type":"string"},"reason":{"type":["string","null"],"description":"Null once the opener's data is erased."},"stage":{"type":"string","enum":["evidence","awaiting_decision","decided"]},"evidence_due_at":{"type":"string","format":"date-time"},"decision_due_at":{"type":["string","null"],"format":"date-time"},"overdue":{"type":"boolean","description":"True once the decision time limit has passed with no decision."},"evidence_count":{"type":"number","description":"Pieces of evidence given so far."},"decision":{"anyOf":[{"$ref":"#/components/schemas/DisputeDecisionObject"},{"type":"null"}]},"card_disputes":{"description":"Card disputes on the same order, linked here but separate.","type":"array","items":{"$ref":"#/components/schemas/CardDisputeObject"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","order","kind","opened_by","opener","reason","stage","evidence_due_at","decision_due_at","overdue","evidence_count","decision","card_disputes","metadata","created_at","updated_at"]},"DisputeList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DisputeObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"AddEvidenceDto":{"type":"object","properties":{"actor":{"type":"string","description":"The buyer or seller giving evidence."},"body":{"type":"string","maxLength":10000},"links":{"maxItems":5,"description":"Links to files the party provided, such as photos you store. HTTPS only.","type":"array","items":{"type":"string"}}},"required":["actor","body"]},"DisputeEvidenceObject":{"type":"object","properties":{"object":{"type":"string","enum":["dispute_evidence"]},"id":{"type":"string","example":"dev_034XtPDs7UJ0TXzTsdaHZa"},"dispute":{"type":"string"},"party":{"type":"string","enum":["buyer","seller"]},"author":{"type":"string"},"body":{"type":["string","null"]},"links":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","dispute","party","author","body","links","created_at"]},"DisputeEvidenceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DisputeEvidenceObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"DecideDisputeDto":{"type":"object","properties":{"against":{"type":"string","enum":["buyer","seller"],"description":"Who the decision went against. They get a dispute_lost reputation event; the other party gets dispute_won."},"note":{"type":"string","description":"The written decision, kept with the dispute.","maxLength":5000},"refund_amount":{"type":"number","description":"Payments on only. Minor units to refund to the buyer; the rest goes to the seller. Defaults: a claimed order whose claim is upheld refunds nothing; one whose claim is rejected refunds everything; a dispute on a completed order refunds nothing.","minimum":0},"decided_by":{"type":"string","description":"Who on your team decided, for the record. Up to 200 characters.","maxLength":200}},"required":["against","note"]},"OpenDisputeDto":{"type":"object","properties":{"actor":{"type":"string","description":"The buyer or seller opening the dispute.","example":"buy_034XtPDs7UJ0TXzTsdaHZa"},"reason":{"type":"string","description":"What went wrong, in their words.","maxLength":2000},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["actor","reason"]},"CreateFlagDto":{"type":"object","properties":{"target":{"type":"string","description":"A listing, seller, or review id.","example":"lst_034XtPDs7UJ0TXzTsdaHZa"},"reporter":{"type":"string","description":"The end user reporting it: a buyer id or a seller id.","example":"buy_034XtPDs7UJ0TXzTsdaHZa"},"reason":{"type":"string","enum":["prohibited_item","counterfeit","scam","offensive","spam","other"]},"note":{"type":"string","maxLength":2000,"description":"The reporter's own words."}},"required":["target","reporter","reason"]},"FlagObject":{"type":"object","properties":{"object":{"type":"string","enum":["flag"]},"id":{"type":"string","example":"flg_034XtPDs7UJ0TXzTsdaHZa"},"target_type":{"type":"string","enum":["listing","seller","review"]},"target":{"type":"string"},"reporter":{"type":"string"},"reason":{"type":"string","enum":["prohibited_item","counterfeit","scam","offensive","spam","other"]},"note":{"type":["string","null"]},"status":{"type":"string","enum":["open","resolved"]},"resolution":{"type":["string","null"],"enum":["dismissed","content_removed","seller_suspended",null]},"action":{"type":["string","null"],"description":"The moderation action that resolved it."},"created_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"}},"required":["object","id","target_type","target","reporter","reason","note","status","resolution","action","created_at","resolved_at"]},"FlagList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/FlagObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"QueueItemObject":{"type":"object","properties":{"object":{"type":"string","enum":["moderation_queue_item"]},"target_type":{"type":"string","enum":["listing","seller","review"]},"target":{"type":"string"},"open_flags":{"type":"number"},"reasons":{"type":"object","additionalProperties":{"type":"integer"},"description":"Open flags by reason."},"first_flagged_at":{"type":"string","format":"date-time"},"last_flagged_at":{"type":"string","format":"date-time"}},"required":["object","target_type","target","open_flags","reasons","first_flagged_at","last_flagged_at"]},"ModerationQueueObject":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"description":"Targets with open flags, the longest waiting first. At most 100.","type":"array","items":{"$ref":"#/components/schemas/QueueItemObject"}}},"required":["object","data"]},"CreateModerationActionDto":{"type":"object","properties":{"target":{"type":"string","description":"The listing, seller, or review acted on."},"action":{"type":"string","enum":["dismiss","remove_content","suspend_seller","reinstate_seller"],"description":"`dismiss` closes the open flags and changes nothing else. `remove_content` removes a listing or a review; a removed review stops counting toward reputation. `suspend_seller` suspends the seller, or the seller of a listing, or a seller who wrote a review: they cannot publish or take orders, and their listings leave search. `reinstate_seller` lifts a suspension."},"reason":{"type":"string","maxLength":2000,"description":"Why. Kept with the action."},"actor":{"type":"string","maxLength":200,"description":"Who on your team took the action, for the log."}},"required":["target","action","reason","actor"]},"ModerationActionObject":{"type":"object","properties":{"object":{"type":"string","enum":["moderation_action"]},"id":{"type":"string","example":"mod_034XtPDs7UJ0TXzTsdaHZa"},"target_type":{"type":"string","enum":["listing","seller","review"]},"target":{"type":"string"},"action":{"type":"string","enum":["dismiss","remove_content","suspend_seller","reinstate_seller"]},"reason":{"type":"string"},"actor":{"type":"string"},"flags_resolved":{"type":"number","description":"Open flags this action resolved."},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","target_type","target","action","reason","actor","flags_resolved","created_at"]},"ModerationActionList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ModerationActionObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"CreateWebhookEndpointDto":{"type":"object","properties":{"url":{"type":"string","description":"An HTTPS URL on the public internet.","example":"https://shop.example/marketsdk/webhooks"},"enabled_events":{"type":"array","description":"Event types to send, or `*` for all.","items":{"type":"string","enum":["*","seller.created","seller.updated","seller.erased","seller.suspended","seller.unsuspended","seller.verification_updated","seller.payouts_updated","buyer.created","buyer.updated","buyer.erased","category.created","category.updated","listing.created","listing.updated","listing.published","listing.unpublished","listing.sold","listing.expired","listing.removed","media.ready","media.deleted","order.created","order.committed","order.claimed","order.cancellation_proposed","order.cancellation_declined","order.cancelled","order.expired","order.completed","order.disputed","payment.created","payment.succeeded","payment.failed","payment.canceled","payment.refunded","payment.released","payment.release_failed","refund.created","refund.updated","verification.created","verification.updated","review.created","review.visible","review.removed","reputation_event.created","reputation_event.voided","dispute.created","dispute.evidence_added","dispute.updated","dispute.decision_overdue","dispute.decided","card_dispute.created","card_dispute.updated","flag.created","flag.resolved","moderation_action.created"]}},"description":{"type":"string","maxLength":200},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url","enabled_events"]},"WebhookEndpointObject":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_endpoint"]},"id":{"type":"string","example":"whe_034XtPDs7UJ0TXzTsdaHZa"},"url":{"type":"string"},"description":{"type":["string","null"]},"enabled_events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"],"description":"Why it was turned off, when MarketSDK turned it off."},"failing_since":{"type":["string","null"],"format":"date-time","description":"Every delivery has failed since this time."},"last_success_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":"string","description":"The signing secret. Returned only when the endpoint is created or its secret rotated."},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","url","description","enabled_events","status","disabled_reason","failing_since","last_success_at","metadata","created_at"]},"WebhookEndpointList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"UpdateWebhookEndpointDto":{"type":"object","properties":{"url":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string","enum":["*","seller.created","seller.updated","seller.erased","seller.suspended","seller.unsuspended","seller.verification_updated","seller.payouts_updated","buyer.created","buyer.updated","buyer.erased","category.created","category.updated","listing.created","listing.updated","listing.published","listing.unpublished","listing.sold","listing.expired","listing.removed","media.ready","media.deleted","order.created","order.committed","order.claimed","order.cancellation_proposed","order.cancellation_declined","order.cancelled","order.expired","order.completed","order.disputed","payment.created","payment.succeeded","payment.failed","payment.canceled","payment.refunded","payment.released","payment.release_failed","refund.created","refund.updated","verification.created","verification.updated","review.created","review.visible","review.removed","reputation_event.created","reputation_event.voided","dispute.created","dispute.evidence_added","dispute.updated","dispute.decision_overdue","dispute.decided","card_dispute.created","card_dispute.updated","flag.created","flag.resolved","moderation_action.created"]}},"description":{"type":"string","maxLength":200},"status":{"type":"string","enum":["enabled","disabled"],"description":"Turn the endpoint off, or back on after it was turned off."},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}},"DeletedWebhookEndpointObject":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_endpoint"]},"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"]},"DeliveryAttemptObject":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"status":{"type":["number","null"],"description":"The HTTP status your endpoint answered with, or null if it did not answer."},"duration_ms":{"type":"number"},"error":{"type":["string","null"]}},"required":["at","status","duration_ms","error"]},"WebhookDeliveryRequestObject":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"string","description":"The exact body sent."}},"required":["headers","body"]},"WebhookDeliveryResponseObject":{"type":"object","properties":{"status":{"type":["number","null"]},"body":{"type":["string","null"],"description":"The first 4,096 characters."}},"required":["status","body"]},"WebhookDeliveryObject":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_delivery"]},"id":{"type":"string","example":"whd_034XtPDs7UJ0TXzTsdaHZa"},"endpoint":{"type":"string"},"event":{"type":"string"},"event_type":{"type":"string"},"replay_of":{"type":["string","null"],"description":"The delivery this one replays."},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"number"},"attempt_log":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryAttemptObject"}},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"request":{"$ref":"#/components/schemas/WebhookDeliveryRequestObject"},"response":{"$ref":"#/components/schemas/WebhookDeliveryResponseObject"},"error":{"type":["string","null"],"description":"Why the last attempt failed."},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["object","id","endpoint","event","event_type","replay_of","status","attempts","attempt_log","next_attempt_at","request","response","error","created_at","completed_at"]},"WebhookDeliveryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]},"EventObject":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"id":{"type":"string","example":"evt_034XtPDs7UJ0TXzTsdaHZa"},"type":{"type":"string","enum":["seller.created","seller.updated","seller.erased","seller.suspended","seller.unsuspended","seller.verification_updated","seller.payouts_updated","buyer.created","buyer.updated","buyer.erased","category.created","category.updated","listing.created","listing.updated","listing.published","listing.unpublished","listing.sold","listing.expired","listing.removed","media.ready","media.deleted","order.created","order.committed","order.claimed","order.cancellation_proposed","order.cancellation_declined","order.cancelled","order.expired","order.completed","order.disputed","payment.created","payment.succeeded","payment.failed","payment.canceled","payment.refunded","payment.released","payment.release_failed","refund.created","refund.updated","verification.created","verification.updated","review.created","review.visible","review.removed","reputation_event.created","reputation_event.voided","dispute.created","dispute.evidence_added","dispute.updated","dispute.decision_overdue","dispute.decided","card_dispute.created","card_dispute.updated","flag.created","flag.resolved","moderation_action.created"]},"api_version":{"type":"string","description":"Always v1 in this version of the API."},"created":{"type":"string","format":"date-time"},"livemode":{"type":"boolean"},"data":{"type":"object","additionalProperties":true,"description":"`data.object` is the object as it was right after the change."}},"required":["object","id","type","api_version","created","livemode","data"]},"EventList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventObject"}},"has_more":{"type":"boolean","description":"Whether another page follows."},"next_cursor":{"type":["string","null"],"description":"Pass as `starting_after` (or `cursor` for search) to get the next page."}},"required":["object","data","has_more","next_cursor"]}}},"x-stripe-permissions":[{"permission":"accounts","category":"Core","resource":"Accounts","level":"Write","used_for":"Create sellers' connected accounts and read their status"},{"permission":"account_links","category":"Connect","resource":"Account Links","level":"Write","used_for":"Onboarding links for sellers"},{"permission":"transfers","category":"Connect","resource":"Transfers","level":"Write","used_for":"Release funds to a seller, and reverse them on a refund"},{"permission":"payment_intents","category":"Core","resource":"Payment Intents","level":"Write","used_for":"Buyer payments, and cancelling unpaid ones"},{"permission":"charges_and_refunds","category":"Core","resource":"Charges and Refunds","level":"Write","used_for":"Refunds, full and partial"},{"permission":"checkout_sessions","category":"Checkout","resource":"Checkout Sessions","level":"Write","used_for":"Hosted checkout, and expiring unpaid sessions"},{"permission":"identity_verification_sessions","category":"Identity","resource":"Verification Sessions and Reports","level":"Write","used_for":"Seller identity verification"},{"permission":"disputes","category":"Core","resource":"Disputes","level":"Read","used_for":"Reading card disputes, to link them to orders"},{"permission":"webhook_endpoints","category":"Webhook Endpoints","resource":"Webhook Endpoints","level":"Write","used_for":"Registering our endpoint on your account"}]}