Update listings
Edits one of the caller org's listings — its copy, price, payout wallet, visibility and documentation, and an expert's profile — under the same rules publish applies, and answers the listing as it now stands.
PATCH /v1/marketplace/listings/{id}
| Address | https://api.hanzo.ai/v1/marketplace/listings/{id} |
| Method | PATCH |
| Operation | patch_marketplace_listings_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Edits one of the caller org's listings — its copy, price, payout wallet, visibility and documentation, and an expert's profile — under the same rules publish applies, and answers the listing as it now stands. Another org's listing and one that does not exist are the same 404. An org admin edits, and an expert edits their own listing.
Request
18 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the listing to edit, from the path. |
category | body | string | — | Category groups the listing in the shop window. |
currency | body | string | — | Currency denominates Price. |
description | body | string | — | Description is the long copy, at most 4096 characters. |
docs | body | string | — | Docs is where the listing's documentation lives; empty clears it. |
expert | body | marketplace.expertIn | — | |
expert.areas | body | string[] | — | Areas is what the expert works on, one or more of configure, base, commerce, bot, agents, cloud, models, creative and freelance. |
expert.availability | body | string | — | Availability is the weekly hours in free form, at most 512 characters. |
expert.languages | body | string[] | — | Languages are 1 to 8 lowercase BCP 47 tags: "en", "es", "zh-cn". |
expert.links | body | string[] | — | Links are 0 to 8 https URLs of at most 200 characters, with a host and no login in them. |
expert.rate | body | string | — | Rate is the hourly rate as a decimal USD string, exact to 18 places; empty or "0" sells no hours. |
expert.skills | body | string[] | — | Skills are 0 to 20 names of 1 to 40 characters, trimmed; a name already said, in any case, is kept once. |
expert.timezone | body | string | — | Timezone is an IANA time zone: "America/Los_Angeles". |
id | body | string | — | ID is the listing to edit, from the path. |
price | body | string | — | Price is the decimal USD price, exact to 18 places; "0" makes it free. |
public | body | boolean | — | Public makes the listing discoverable by other orgs, or withdraws it. |
recipient | body | string | — | Recipient is the payout wallet id, in the publishing org. |
title | body | string | — | Title is the shop-window name, 1-200 characters. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | marketplace.Listing | ok |
default | problem-details | refused |
200 body — 53 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
category | body | string | — | Category groups the listing in the shop window. |
createdAt | body | integer (int64) | — | CreatedAt is when the listing was published, in Unix SECONDS, minted at insert. |
currency | body | string | — | Currency is the ISO 4217 code Price is quoted in; Create defaults it to "USD" when the publisher names none. |
description | body | string | — | Description is the long copy. |
docs | body | string | — | Docs is where the listing's documentation lives: an https URL, or a path on docs.hanzo.ai. |
expert | body | marketplace.Expert | — | |
expert.areas | body | string[] | — | Areas is what the expert works on: configure, base, commerce, bot, agents, cloud, models, creative or freelance. |
expert.availability | body | string | — | Availability is the expert's weekly hours, in their own words. |
expert.languages | body | string[] | — | Languages are the languages the expert works in, lowercase BCP 47 tags. |
expert.links | body | string[] | — | Links are where the expert's work can be seen: up to 8 https URLs. |
expert.person | body | string | — | Person is the expert's IAM identity: the verified principal that published the listing, never taken off the wire. |
expert.products | body | marketplace.Score[] | — | Products are the products the expert scores highest in, at most three, best first, each with the parts its score is made of; absent until they score in any (expertise.go). |
expert.products[].parts | body | marketplace.Parts | — | |
expert.products[].parts.badges | body | number (double) | — | Badges is the points for the badges held that show the product was used. |
expert.products[].parts.contributions | body | number (double) | — | Contributions is the points for merged pull requests and completed bounties in the product's public repositories. |
expert.products[].parts.jobs | body | number (double) | — | Jobs is the points for jobs released in the product's areas, weighted by stars. |
expert.products[].parts.usage | body | number (double) | — | Usage is the points for lifetime tokens on the product's model family. |
expert.products[].product | body | string | — | Product is the product's id. |
expert.products[].score | body | number (double) | — | Score is the sum of Parts, to one decimal. |
expert.rate | body | any | — | Rate is the hourly rate, exact to 18 decimal places of USD; "0" when the expert sells only a fixed engagement (the listing's price). |
expert.reward | body | marketplace.Reward | — | |
expert.reward.badges | body | marketplace.Badge[] | — | Badges are the three the profile shows first, the rarest first. |
expert.reward.badges[].id | body | string | — | ID is the badge's id, such as first-merge. |
expert.reward.badges[].name | body | string | — | Name is what it is called. |
expert.reward.badges[].pillar | body | string | — | Pillar is what it is for: use, share, community, contribute or expert. |
expert.reward.badges[].rarity | body | string | — | Rarity is how rare it is, from common up. |
expert.reward.level | body | integer (int64) | — | Level is the level the profile shows, such as 2. |
expert.reward.levelName | body | string | — | LevelName is its name, such as Shipper. |
expert.reward.pillars | body | marketplace.Pillars | — | |
expert.reward.pillars.community | body | integer (int64) | — | Community is claims for joining in: Discord, stars and follows. |
expert.reward.pillars.contribute | body | integer (int64) | — | Contribute is claims for building it: merged work, bounties and demos. |
expert.reward.pillars.expert | body | integer (int64) | — | Expert is claims for the work of an expert on the marketplace. |
expert.reward.pillars.share | body | integer (int64) | — | Share is claims for sharing it: referrals and posts. |
expert.reward.pillars.use | body | integer (int64) | — | Use is claims for using Hanzo: models and products. |
expert.reward.points | body | integer (int64) | — | Points are the lifetime points. |
expert.reward.tier | body | marketplace.Tier | — | |
expert.reward.tier.id | body | string | — | ID is the badge's id, such as billionaire. |
expert.reward.tier.label | body | string | — | Label is how the milestone reads, such as 1B+. |
expert.self | body | boolean | — | Self is whether the expert is the caller. |
expert.skills | body | string[] | — | Skills are what the expert is good at, in their own words: up to 20 names of up to 40 characters, each once whatever its case. |
expert.timezone | body | string | — | Timezone is the expert's IANA time zone, "America/Los_Angeles". |
expert.top | body | string[] | — | Top names the products in which the expert ranks among the best three of all experts, in the order of the product list. |
expert.verified | body | boolean | — | Verified is whether staff vouch for the expert. |
id | body | string | — | ID is the listing's id, minted here as "lst_" + 16 hex characters. |
kind | body | string | — | Kind is what the listing sells: agent, persona, app, skill, mcp, tool or expert. |
price | body | any | — | Price is the exact price, 18 decimal places of USD: per call for a tool, the price a job is offered at for an agent. |
public | body | boolean | — | Public is whether other orgs can discover the listing. |
publisherOrg | body | string | — | PublisherOrg is the org that published the listing, taken from the validated principal and never off the wire. |
recipient | body | string | — | Recipient is the seller's payout WALLET id in PublisherOrg: the wallet x402 pays for a call or a job bought through this listing. |
ref | body | string | — | Ref is the id the thing's owning app knows it by, resolved when the listing was published — the agent id for an agent named by its name. |
title | body | string | — | Title is the shop-window name, required and refused past 200 bytes. |
tool | body | string | — | Tool names the thing sold, as the seller named it: the agent, app, skill or MCP server's name or id, or the tool's registry name. |
updatedAt | body | integer (int64) | — | UpdatedAt is when the listing was last edited, unix seconds; its creation when it never was. |
Failure carries the platform error shape — see Errors.
Examples
hanzo marketplace listings update <id>import { Configuration, MarketplaceApi } from 'hanzoai';
const api = new MarketplaceApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.patchMarketplaceListingsById({ id: 'id', category: "<category>", currency: "<currency>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketplaceApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketplaceApi(client).patch_marketplace_listings_by_id(id='id', category="<category>", currency="<currency>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.MarketplaceAPI.PatchMarketplaceListingsById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, marketplace_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = marketplace_api::patch_marketplace_listings_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketplaceApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new MarketplaceApi(client).patchMarketplaceListingsById();curl -X PATCH https://api.hanzo.ai/v1/marketplace/listings/<id> \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"category": "<category>",
"currency": "<currency>"
}'MCP reaches marketplace through the marketplace tool, which names its 24 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_marketplaces"
}
}
}'