client.marketplace.get_marketplace() -> MarketplaceObject
-
-
-
Settings are changed in the dashboard, separately for test and live.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.marketplace.get_marketplace()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.list_sellers(...) -> SellerList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.list_sellers()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
external_id:
typing.Optional[str]— Find the seller with this external id.
-
status:
typing.Optional[ListSellersRequestStatus]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.create_seller(...) -> SellerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.create_seller( external_id="external_id", )
-
-
-
request:
CreatePartyDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.get_seller(...) -> SellerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.get_seller( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.erase_seller(...) -> SellerObject
-
-
-
Removes the name, external id, metadata, storefront, and review text, and takes the listings down. Orders and reputation stay, without personal data.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.erase_seller( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.update_seller(...) -> SellerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.update_seller( id="id", )
-
-
-
id:
str
-
request:
UpdatePartyDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.put_storefront(...) -> StorefrontObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.put_storefront( id="id", name="name", slug="jane-templates", )
-
-
-
id:
str
-
name:
str
-
slug:
str— Lowercase letters, digits, and hyphens. Unique per marketplace.
-
description:
typing.Optional[str]
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.create_onboarding_link(...) -> OnboardingLinkObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.create_onboarding_link( id="id", return_url="return_url", refresh_url="refresh_url", )
-
-
-
id:
str
-
return_url:
str— Where Stripe sends the seller when they finish or leave onboarding.
-
refresh_url:
str— Where Stripe sends the seller if the link expired. Create a new link there.
-
country:
typing.Optional[str]— 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.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.sellers.get_seller_profile(...) -> SellerProfileObject
-
-
-
Callable with a publishable key. Shows only what a buyer may see.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.sellers.get_seller_profile( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.buyers.list_buyers(...) -> BuyerList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.buyers.list_buyers()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
external_id:
typing.Optional[str]— Find the buyer with this external id.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.buyers.create_buyer(...) -> BuyerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.buyers.create_buyer( external_id="external_id", )
-
-
-
request:
CreatePartyDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.buyers.get_buyer(...) -> BuyerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.buyers.get_buyer( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.buyers.erase_buyer(...) -> BuyerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.buyers.erase_buyer( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.buyers.update_buyer(...) -> BuyerObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.buyers.update_buyer( id="id", )
-
-
-
id:
str
-
request:
UpdatePartyDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.list_categories(...) -> CategoryList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.list_categories()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.create_category(...) -> CategoryObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.create_category( key="ui-kits", name="name", )
-
-
-
key:
str— Your key for the category. Unique per marketplace.
-
name:
str
-
description:
typing.Optional[str]
-
parent:
typing.Optional[str]— Another category of this marketplace.
-
attribute_schema:
typing.Optional[AttributeSchemaObject]
-
fee:
typing.Optional[CategoryFeeDto]— Overrides the marketplace's platform fee for listings in this category. Null uses the marketplace fee.
-
prohibited:
typing.Optional[bool]— Listings in a prohibited category cannot be published (section 9.4).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.get_category(...) -> CategoryObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.get_category( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.update_category(...) -> CategoryObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.update_category( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
-
description:
typing.Optional[str]
-
parent:
typing.Optional[str]
-
fee:
typing.Optional[CategoryFeeDto]
-
prohibited:
typing.Optional[bool]— Listings in a prohibited category cannot be published. Listings already published stay until moderated.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.get_attribute_schema(...) -> AttributeSchemaObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.get_attribute_schema( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.categories.put_attribute_schema(...) -> AttributeSchemaObject
-
-
-
Refused if a listing already in the category would no longer fit.
-
-
-
from marketsdk import MarketSDK, AttributeDefinitionObject from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.categories.put_attribute_schema( id="id", attributes=[ AttributeDefinitionObject( key="format", type="string", ) ], )
-
-
-
id:
str
-
request:
AttributeSchemaObject
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.list_listings(...) -> ListingList
-
-
-
With a publishable key, only published listings are listed.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.list_listings()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
seller:
typing.Optional[str]
-
category:
typing.Optional[str]
-
status:
typing.Optional[ListListingsRequestStatus]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.create_listing(...) -> ListingObject
-
-
-
from marketsdk import MarketSDK, MoneyDto from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.create_listing( seller="sel_034XtPDs7UJ0TXzTsdaHZa", title="title", price=MoneyDto( amount=4900, currency="USD", ), )
-
-
-
request:
CreateListingDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.create_listings(...) -> BulkListingsObject
-
-
-
from marketsdk import MarketSDK, CreateListingDto, MoneyDto from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.create_listings( listings=[ CreateListingDto( seller="sel_034XtPDs7UJ0TXzTsdaHZa", title="title", price=MoneyDto( amount=4900, currency="USD", ), ) ], )
-
-
-
listings:
typing.List[CreateListingDto]— All are created, or none.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.get_listing(...) -> ListingObject
-
-
-
With a publishable key, only a published listing can be retrieved.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.get_listing( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.update_listing(...) -> ListingObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.update_listing( id="id", )
-
-
-
id:
str
-
category:
typing.Optional[str]
-
title:
typing.Optional[str]
-
description:
typing.Optional[str]
-
price:
typing.Optional[MoneyDto]
-
quantity:
typing.Optional[float]— The total. Cannot go below what open orders have reserved.
-
attributes:
typing.Optional[typing.Dict[str, typing.Any]]
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
expires_at:
typing.Optional[datetime.datetime]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.publish_listing(...) -> ListingObject
-
-
-
Needs an active seller, verified when seller verification is on, and a category that is not prohibited.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.publish_listing( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.unpublish_listing(...) -> ListingObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.unpublish_listing( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.remove_listing(...) -> ListingObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.remove_listing( id="id", reason="reason", )
-
-
-
id:
str
-
reason:
str— Recorded with the removal.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.list_media(...) -> MediaList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.list_media( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.create_media(...) -> MediaUploadObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.create_media( id="id", content_type="image/jpeg", size_bytes=1.1, )
-
-
-
id:
str
-
content_type:
CreateMediaDtoContentType
-
size_bytes:
float— The exact size of the file, in bytes. At most 10 MB.
-
position:
typing.Optional[float]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.complete_media(...) -> MediaObject
-
-
-
Checks the stored file against the declared type and size.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.complete_media( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.listings.delete_media(...) -> MediaObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.listings.delete_media( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.search.search_listings(...) -> ListingList
-
-
-
Full text over title and description, with filters and sorting. Only published listings with something available are returned. Callable with a publishable key.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.search.search_listings()
-
-
-
q:
typing.Optional[str]— Full text over title and description.
-
category:
typing.Optional[str]
-
seller:
typing.Optional[str]
-
min_price:
typing.Optional[float]— Minor units.
-
max_price:
typing.Optional[float]— Minor units.
-
attributes:
typing.Optional[typing.Dict[str, typing.Any]]— 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.
-
sort:
typing.Optional[SearchListingsSearchRequestSort]— Relevance needs q. Default newest.
-
limit:
typing.Optional[float]
-
cursor:
typing.Optional[str]— The next_cursor of the previous page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.list_orders(...) -> OrderList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.list_orders()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
buyer:
typing.Optional[str]
-
seller:
typing.Optional[str]
-
listing:
typing.Optional[str]
-
state:
typing.Optional[ListOrdersRequestState]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.create_order(...) -> OrderObject
-
-
-
The buyer commits to buy. Quantity is reserved at once. With payments off the order is committed; with payments on it awaits payment.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.create_order( listing="lst_034XtPDs7UJ0TXzTsdaHZa", buyer="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
listing:
str
-
buyer:
str— The buyer placing the order. The actor for this transition.
-
quantity:
typing.Optional[float]
-
checkout:
typing.Optional[CheckoutUrlsDto]— 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.
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.get_order(...) -> OrderObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.get_order( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.list_order_events(...) -> OrderEventList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.list_order_events( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.claim_order(...) -> OrderObject
-
-
-
Called from your server.
actorsays which end user is acting; we check they are a party to the order and may make this transition.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.claim_order( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.confirm_order(...) -> OrderObject
-
-
-
Called from your server.
actorsays which end user is acting; we check they are a party to the order and may make this transition.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.confirm_order( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.back_out_of_order(...) -> OrderObject
-
-
-
Called from your server.
actorsays 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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.back_out_of_order( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.propose_cancel(...) -> OrderObject
-
-
-
Called from your server.
actorsays 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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.propose_cancel( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.accept_cancel(...) -> OrderObject
-
-
-
Called from your server.
actorsays which end user is acting; we check they are a party to the order and may make this transition.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.accept_cancel( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.decline_cancel(...) -> OrderObject
-
-
-
Called from your server.
actorsays which end user is acting; we check they are a party to the order and may make this transition.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.decline_cancel( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", )
-
-
-
id:
str
-
request:
ActorDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.list_order_reviews(...) -> ReviewList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.list_order_reviews( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.orders.create_review(...) -> ReviewObject
-
-
-
Called from your server.
actorsays 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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.orders.create_review( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", rating=1.1, )
-
-
-
id:
str
-
actor:
str— 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.
-
rating:
float
-
body:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.reviews.list_reviews(...) -> ReviewList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.reviews.list_reviews( subject="subject", )
-
-
-
subject:
str— The buyer or seller the reviews are about.
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.reviews.get_review(...) -> ReviewObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.reviews.get_review( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.reputation.list_reputation_events(...) -> ReputationEventList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.reputation.list_reputation_events( party="party", )
-
-
-
party:
str— The buyer or seller whose events to list.
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.reputation.void_reputation_event(...) -> ReputationEventObject
-
-
-
For the customer's team. Writes a second event pointing at the first. The voided event stops counting. Nothing is deleted.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.reputation.void_reputation_event( id="id", reason="reason", )
-
-
-
id:
str
-
reason:
str— Why the event is voided. Recorded on the voiding event.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.list_payments(...) -> PaymentList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.list_payments()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
order:
typing.Optional[str]— Only the payment for this order.
-
status:
typing.Optional[ListPaymentsRequestStatus]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.get_payment(...) -> PaymentObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.get_payment( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.update_payment(...) -> PaymentObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.update_payment( id="id", metadata={ "key": "value" }, )
-
-
-
id:
str
-
request:
UpdateMetadataDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.retry_payment_release(...) -> PaymentObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.retry_payment_release( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.list_refunds(...) -> RefundList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.list_refunds()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
payment:
typing.Optional[str]
-
order:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.create_refund(...) -> RefundObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.create_refund()
-
-
-
payment:
typing.Optional[str]— The payment to refund. Give this ororder.
-
order:
typing.Optional[str]— The order whose payment to refund. Give this orpayment.
-
amount:
typing.Optional[float]— Minor units. Defaults to everything not yet refunded.
-
reason:
typing.Optional[CreateRefundDtoReason]
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.get_refund(...) -> RefundObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.get_refund( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.payments.update_refund(...) -> RefundObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.payments.update_refund( id="id", metadata={ "key": "value" }, )
-
-
-
id:
str
-
request:
UpdateMetadataDto
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.create_verification(...) -> VerificationObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.create_verification( id="id", )
-
-
-
id:
str
-
return_url:
typing.Optional[str]— Where Stripe sends the seller after the verification page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.list_verifications(...) -> VerificationList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.list_verifications()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
seller:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.get_verification(...) -> VerificationObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.get_verification( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.cancel_verification(...) -> VerificationObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.cancel_verification( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.list_disputes(...) -> DisputeList
-
-
-
Filter by
stagefor a queue.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.list_disputes()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
stage:
typing.Optional[ListDisputesRequestStage]
-
order:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.get_dispute(...) -> DisputeObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.get_dispute( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.list_dispute_evidence(...) -> DisputeEvidenceList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.list_dispute_evidence( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.add_dispute_evidence(...) -> DisputeEvidenceObject
-
-
-
Only while the dispute is in its evidence stage.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.add_dispute_evidence( id="id", actor="actor", body="body", )
-
-
-
id:
str
-
actor:
str— The buyer or seller giving evidence.
-
body:
str
-
links:
typing.Optional[typing.List[str]]— Links to files the party provided, such as photos you store. HTTPS only.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.close_dispute_evidence(...) -> DisputeObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.close_dispute_evidence( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.decide_dispute(...) -> DisputeObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.decide_dispute( id="id", against="buyer", note="note", )
-
-
-
id:
str
-
against:
DecideDisputeDtoAgainst— Who the decision went against. They get a dispute_lost reputation event; the other party gets dispute_won.
-
note:
str— The written decision, kept with the dispute.
-
refund_amount:
typing.Optional[float]— 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.
-
decided_by:
typing.Optional[str]— Who on your team decided, for the record. Up to 200 characters.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.trust.open_dispute(...) -> DisputeObject
-
-
-
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.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.trust.open_dispute( id="id", actor="buy_034XtPDs7UJ0TXzTsdaHZa", reason="reason", )
-
-
-
id:
str
-
actor:
str— The buyer or seller opening the dispute.
-
reason:
str— What went wrong, in their words.
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.list_flags(...) -> FlagList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.list_flags()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
status:
typing.Optional[ListFlagsRequestStatus]
-
target:
typing.Optional[str]— Only flags on this listing, seller, or review.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.create_flag(...) -> FlagObject
-
-
-
On behalf of the end user who reported it.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.create_flag( target="lst_034XtPDs7UJ0TXzTsdaHZa", reporter="buy_034XtPDs7UJ0TXzTsdaHZa", reason="prohibited_item", )
-
-
-
target:
str— A listing, seller, or review id.
-
reporter:
str— The end user reporting it: a buyer id or a seller id.
-
reason:
CreateFlagDtoReason
-
note:
typing.Optional[str]— The reporter's own words.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.get_flag(...) -> FlagObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.get_flag( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.get_moderation_queue(...) -> ModerationQueueObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.get_moderation_queue()
-
-
-
target_type:
typing.Optional[GetModerationQueueRequestTargetType]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.list_moderation_actions(...) -> ModerationActionList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.list_moderation_actions()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
target:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.moderation.create_moderation_action(...) -> ModerationActionObject
-
-
-
Resolves the target's open flags and logs who acted and why.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.moderation.create_moderation_action( target="target", action="dismiss", reason="reason", actor="actor", )
-
-
-
target:
str— The listing, seller, or review acted on.
-
action:
CreateModerationActionDtoAction—dismisscloses the open flags and changes nothing else.remove_contentremoves a listing or a review; a removed review stops counting toward reputation.suspend_sellersuspends 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_sellerlifts a suspension.
-
reason:
str— Why. Kept with the action.
-
actor:
str— Who on your team took the action, for the log.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.list_webhook_endpoints(...) -> WebhookEndpointList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.list_webhook_endpoints()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.create_webhook_endpoint(...) -> WebhookEndpointObject
-
-
-
Returns the signing secret, once. Every delivery carries
MarketSDK-Signature: t=<time>,v1=<HMAC-SHA256 of "<time>.<body>">.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.create_webhook_endpoint( url="https://shop.example/marketsdk/webhooks", enabled_events=[ "*" ], )
-
-
-
url:
str— An HTTPS URL on the public internet.
-
enabled_events:
typing.List[CreateWebhookEndpointDtoEnabledEventsItem]— Event types to send, or*for all.
-
description:
typing.Optional[str]
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.get_webhook_endpoint(...) -> WebhookEndpointObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.get_webhook_endpoint( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.delete_webhook_endpoint(...) -> DeletedWebhookEndpointObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.delete_webhook_endpoint( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.update_webhook_endpoint(...) -> WebhookEndpointObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.update_webhook_endpoint( id="id", )
-
-
-
id:
str
-
url:
typing.Optional[str]
-
enabled_events:
typing.Optional[typing.List[UpdateWebhookEndpointDtoEnabledEventsItem]]
-
description:
typing.Optional[str]
-
status:
typing.Optional[UpdateWebhookEndpointDtoStatus]— Turn the endpoint off, or back on after it was turned off.
-
metadata:
typing.Optional[typing.Dict[str, str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.rotate_webhook_secret(...) -> WebhookEndpointObject
-
-
-
Returns the new secret, once. The old one stops at once.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.rotate_webhook_secret( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.list_webhook_deliveries(...) -> WebhookDeliveryList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.list_webhook_deliveries()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
endpoint:
typing.Optional[str]
-
status:
typing.Optional[ListWebhookDeliveriesRequestStatus]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.get_webhook_delivery(...) -> WebhookDeliveryObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.get_webhook_delivery( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.replay_webhook_delivery(...) -> WebhookDeliveryObject
-
-
-
Creates a new delivery of the same event to the same endpoint.
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.replay_webhook_delivery( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.list_events(...) -> EventList
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.list_events()
-
-
-
limit:
typing.Optional[float]
-
starting_after:
typing.Optional[str]— Thenext_cursorof the previous page.
-
type:
typing.Optional[ListEventsRequestType]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.get_event(...) -> EventObject
-
-
-
from marketsdk import MarketSDK from marketsdk.environment import MarketSDKEnvironment client = MarketSDK( token="<token>", environment=MarketSDKEnvironment.DEFAULT, ) client.webhooks.get_event( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-