WalletD developers
Catalog

Edit an offering

A draft may change anything. A published item may be repriced, and the change is recorded in its price history.

PUT/v1/clients/{clientId}/offerings/{offeringId}

A draft may change anything. A published item may be repriced, and the change is recorded in its price history. A published plan may only change how it presents itself, because subscribers are already being charged its price. An archived offering cannot be edited at all.

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://example.com/v1/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08/offerings/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{  "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"}