WalletD developers
Catalog

Publish a draft offering to discovery

Moves a draft into discovery. This is the only client action that puts something in front of the loop's users, so it is the one that waits for approval: a client the platform has not made active is...

POST/v1/clients/{clientId}/offerings/{offeringId}/publish

Moves a draft into discovery. This is the only client action that puts something in front of the loop's users, so it is the one that waits for approval: a client the platform has not made active is refused client_not_approved (409), while drafting, pricing and profile edits all work while it is pending. Needs authority over the client — membership of its organization, an API key bound to this client, or tenant staff holding clients:manage; anything else is refused not_client_member or insufficient_scope (403), and an unknown client client_not_found (404). Refuses offering_not_found (404) and invalid_transition (409).

Authorization

bearerAuth
AuthorizationBearer <token>

A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.

In: header

Path Parameters

clientId*string
Formatuuid
offeringId*string
Formatuuid

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08/offerings/497f6eca-6276-4993-bfeb-53cbbbba6f08/publish"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "client_id": "5b3fa7ba-57d3-4017-a65b-d57dcd2db643",  "kind": "item",  "title": "string",  "description": "string",  "amount": 0,  "interval": "weekly",  "image_url": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "commission_bps": 0,  "category_id": "8de4c9fd-61a4-4c0b-bf88-0ed3a0fe3fa2",  "options": [    "string"  ],  "markup": {    "kind": "percent",    "value": 0  },  "variants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "offering_id": "a7d124b6-6a8c-44d1-9d46-4636e3f8c04e",      "sku": "string",      "barcode": "string",      "option_values": [        "string"      ],      "position": 0,      "pricing_mode": "manual",      "cost_amount": 0,      "markup": {        "kind": "percent",        "value": 0      },      "amount": 0,      "image_url": "string",      "inventory": {        "track_inventory": true,        "in_stock": true,        "low_stock": true,        "on_hand": 0,        "reserved": 0,        "available": 0,        "allow_backorder": true,        "low_stock_threshold": 0      },      "status": "active",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "status": "draft",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}