#Shared wishlists
These endpoints are called from a shopper's browser, so they take your publishable key rather than a secret one. Anything specific to one customer also takes a signed email and timestamp. Identifying the customer explains how to produce the signature.
To call them from your own server instead, send a secret key as a bearer token and leave apiPublishableKey out. See Calling the widget API from a server.
GET /widgets/shared-wishlists/{shareToken}
Read a shared wishlist by its share token, for a store that shows shared lists on a page of its own site instead of the hosted page. No customer signature is needed: the token in the link is the only credential, exactly as on the hosted page. A private list, an unknown token and a store with sharing switched off all answer the same 404, so tokens can't be probed
Path parameters
shareTokenstringrequiredThe share token from the link the visitor arrived on: the meiseiWishlist query parameter, or wherever {token} was placed in the store's share page address.
Query parameters
apiPublishableKeystringYour organization's publishable key, from Settings, API keys. Leave it out when the request carries a secret key as a bearer token instead, which is how a server calls these endpoints.
curl \
"https://your-store.meisei.app/api/widgets/shared-wishlists/string?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY"import { client } from "@meisei/api/widget/client"
import { getWidgetsSharedWishlistsByShareToken } from "@meisei/api/widget"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
})
const { data, error } = await getWidgetsSharedWishlistsByShareToken({
path: { shareToken: "string" },
query: { apiPublishableKey: "pk_YOUR_PUBLISHABLE_KEY" },
})require "meisei"
meisei = Meisei::WidgetClient.new(
publishable_key: "pk_YOUR_PUBLISHABLE_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.retrieve("string")from meisei import WidgetClient
meisei = WidgetClient(
publishable_key="pk_YOUR_PUBLISHABLE_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.retrieve("string"){
"name": "string",
"ownerFirstName": "string",
"showPrices": true,
"purchaseMarkingEnabled": true,
"items": [
{
"id": "A4Ws1igz",
"quantity": 0,
"note": "string",
"imageUrl": "string",
"purchasedQuantity": 0,
"purchases": ["..."],
"priceCents": 0,
"currencyCode": "string",
"product": {
"title": "...",
"imageUrl": "...",
"url": "..."
},
"variant": {
"title": "...",
"imageUrl": "..."
}
}
]
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The wishlist's name, as the customer typed it."
},
"ownerFirstName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The owner's first name for display, or null if they have none on file."
},
"showPrices": {
"type": "boolean",
"description": "Whether the organization wants item prices shown on the page."
},
"purchaseMarkingEnabled": {
"type": "boolean",
"description": "Whether the organization lets viewers mark items on this page as purchased."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the wishlist item.",
"idCodec": "sqid"
},
"quantity": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "How many of this item the customer wants, or null if they did not say."
},
"note": {
"type": "string",
"description": "The customer's note about this item, such as a size or color preference."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The customer's own photo of the item, shown in place of the product image, or null if they added none or the store has photos switched off."
},
"purchasedQuantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many have already been bought, never more than the customer asked for."
},
"purchases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "The note the buyer left, or an empty string."
},
"purchasedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the purchase was recorded."
}
},
"required": ["note", "purchasedAt"],
"additionalProperties": false
},
"description": "Each purchase recorded against the item, oldest first."
},
"priceCents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "The item's stored price in cents, or null when unknown or hidden."
},
"currencyCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The currency of `priceCents` as an ISO 4217 code, or null when unknown or hidden."
},
"product": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The product's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's main image."
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's page on the storefront, or null if it is not known."
}
},
"required": ["title", "imageUrl", "url"],
"additionalProperties": false
},
"variant": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The variant's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the variant's image."
}
},
"required": ["title", "imageUrl"],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "The variant the customer saved, or null if they saved the product as a whole."
}
},
"required": [
"id",
"quantity",
"note",
"imageUrl",
"purchasedQuantity",
"purchases",
"priceCents",
"currencyCode",
"product",
"variant"
],
"additionalProperties": false
},
"description": "The wishlist's items, newest first."
}
},
"required": ["name", "ownerFirstName", "showPrices", "purchaseMarkingEnabled", "items"],
"additionalProperties": false,
"description": "The shared list, as a gift buyer sees it."
}POST /widgets/shared-wishlists/{shareToken}/items/{itemId}/purchase
Mark an item on a shared wishlist as purchased, as a visitor to the store's own shared list page. The answer carries a one-time undoToken: keep it in the visitor's browser, because it is the only way to undo the marking, and it stops working 30 minutes later. Refused while the store has purchase marking switched off, and once the item is fully purchased. Rate limited per share token
Path parameters
shareTokenstringrequiredThe share token from the link the visitor arrived on: the meiseiWishlist query parameter, or wherever {token} was placed in the store's share page address.
itemIdstringrequiredThe ID of the item, from the shared list's items.
Query parameters
apiPublishableKeystringYour organization's publishable key, from Settings, API keys. Leave it out when the request carries a secret key as a bearer token instead, which is how a server calls these endpoints.
Body parameters
quantityintegerHow many the visitor bought. Defaults to 1, and can't exceed what is still needed.
notestringA short note other visitors see, such as who bought it.
browserFingerprintstring | nullAn optional browser fingerprint, kept hashed for abuse tracing only.
curl \
-X POST \
"https://your-store.meisei.app/api/widgets/shared-wishlists/string/items/A4Ws1igz/purchase?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
-d '{
"quantity": 0,
"note": "string",
"browserFingerprint": "string"
}'import { client } from "@meisei/api/widget/client"
import { postWidgetsSharedWishlistsByShareTokenItemsByItemIdPurchase } from "@meisei/api/widget"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
})
const { data, error } = await postWidgetsSharedWishlistsByShareTokenItemsByItemIdPurchase({
path: { shareToken: "string", itemId: "A4Ws1igz" },
query: { apiPublishableKey: "pk_YOUR_PUBLISHABLE_KEY" },
body: {
quantity: 0,
note: "string",
browserFingerprint: "string",
},
})require "meisei"
meisei = Meisei::WidgetClient.new(
publishable_key: "pk_YOUR_PUBLISHABLE_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.items.purchase(
"string",
"A4Ws1igz",
quantity: 0,
note: "string",
browser_fingerprint: "string",
)from meisei import WidgetClient
meisei = WidgetClient(
publishable_key="pk_YOUR_PUBLISHABLE_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.items.purchase(
"string",
"A4Ws1igz",
quantity=0,
note="string",
browser_fingerprint="string",
){
"data": {
"name": "string",
"ownerFirstName": "string",
"showPrices": true,
"purchaseMarkingEnabled": true,
"items": [
{
"id": "...",
"quantity": "...",
"note": "...",
"imageUrl": "...",
"purchasedQuantity": "...",
"purchases": "...",
"priceCents": "...",
"currencyCode": "...",
"product": "...",
"variant": "..."
}
]
},
"undoToken": "string",
"undoExpiresAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The wishlist's name, as the customer typed it."
},
"ownerFirstName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The owner's first name for display, or null if they have none on file."
},
"showPrices": {
"type": "boolean",
"description": "Whether the organization wants item prices shown on the page."
},
"purchaseMarkingEnabled": {
"type": "boolean",
"description": "Whether the organization lets viewers mark items on this page as purchased."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the wishlist item.",
"idCodec": "sqid"
},
"quantity": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "How many of this item the customer wants, or null if they did not say."
},
"note": {
"type": "string",
"description": "The customer's note about this item, such as a size or color preference."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The customer's own photo of the item, shown in place of the product image, or null if they added none or the store has photos switched off."
},
"purchasedQuantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many have already been bought, never more than the customer asked for."
},
"purchases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "The note the buyer left, or an empty string."
},
"purchasedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the purchase was recorded."
}
},
"required": ["note", "purchasedAt"],
"additionalProperties": false
},
"description": "Each purchase recorded against the item, oldest first."
},
"priceCents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "The item's stored price in cents, or null when unknown or hidden."
},
"currencyCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The currency of `priceCents` as an ISO 4217 code, or null when unknown or hidden."
},
"product": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The product's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's main image."
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's page on the storefront, or null if it is not known."
}
},
"required": ["title", "imageUrl", "url"],
"additionalProperties": false
},
"variant": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The variant's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the variant's image."
}
},
"required": ["title", "imageUrl"],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "The variant the customer saved, or null if they saved the product as a whole."
}
},
"required": [
"id",
"quantity",
"note",
"imageUrl",
"purchasedQuantity",
"purchases",
"priceCents",
"currencyCode",
"product",
"variant"
],
"additionalProperties": false
},
"description": "The wishlist's items, newest first."
}
},
"required": ["name", "ownerFirstName", "showPrices", "purchaseMarkingEnabled", "items"],
"additionalProperties": false,
"description": "The wishlist as it now reads."
},
"undoToken": {
"type": "string",
"description": "A one-time secret this browser keeps. It is the only way to undo this marking, so nobody else can undo it."
},
"undoExpiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the undo stops working."
}
},
"required": ["data", "undoToken", "undoExpiresAt"],
"additionalProperties": false
}POST /widgets/shared-wishlists/{shareToken}/items/{itemId}/undo
Undo a marking made through the purchase endpoint, within 30 minutes and only with the undoToken it answered with. Rate limited per share token
Path parameters
shareTokenstringrequiredThe share token from the link the visitor arrived on: the meiseiWishlist query parameter, or wherever {token} was placed in the store's share page address.
itemIdstringrequiredThe ID of the item, from the shared list's items.
Query parameters
apiPublishableKeystringYour organization's publishable key, from Settings, API keys. Leave it out when the request carries a secret key as a bearer token instead, which is how a server calls these endpoints.
Body parameters
undoTokenstringrequiredThe undoToken the marking answered with. Only the browser holding it can undo.
curl \
-X POST \
"https://your-store.meisei.app/api/widgets/shared-wishlists/string/items/A4Ws1igz/undo?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
-d '{
"undoToken": "string"
}'import { client } from "@meisei/api/widget/client"
import { postWidgetsSharedWishlistsByShareTokenItemsByItemIdUndo } from "@meisei/api/widget"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
})
const { data, error } = await postWidgetsSharedWishlistsByShareTokenItemsByItemIdUndo({
path: { shareToken: "string", itemId: "A4Ws1igz" },
query: { apiPublishableKey: "pk_YOUR_PUBLISHABLE_KEY" },
body: {
undoToken: "string",
},
})require "meisei"
meisei = Meisei::WidgetClient.new(
publishable_key: "pk_YOUR_PUBLISHABLE_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.items.undo(
"string",
"A4Ws1igz",
undo_token: "string",
)from meisei import WidgetClient
meisei = WidgetClient(
publishable_key="pk_YOUR_PUBLISHABLE_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.shared_wishlists.items.undo(
"string",
"A4Ws1igz",
undo_token="string",
){
"name": "string",
"ownerFirstName": "string",
"showPrices": true,
"purchaseMarkingEnabled": true,
"items": [
{
"id": "A4Ws1igz",
"quantity": 0,
"note": "string",
"imageUrl": "string",
"purchasedQuantity": 0,
"purchases": ["..."],
"priceCents": 0,
"currencyCode": "string",
"product": {
"title": "...",
"imageUrl": "...",
"url": "..."
},
"variant": {
"title": "...",
"imageUrl": "..."
}
}
]
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The wishlist's name, as the customer typed it."
},
"ownerFirstName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The owner's first name for display, or null if they have none on file."
},
"showPrices": {
"type": "boolean",
"description": "Whether the organization wants item prices shown on the page."
},
"purchaseMarkingEnabled": {
"type": "boolean",
"description": "Whether the organization lets viewers mark items on this page as purchased."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the wishlist item.",
"idCodec": "sqid"
},
"quantity": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "How many of this item the customer wants, or null if they did not say."
},
"note": {
"type": "string",
"description": "The customer's note about this item, such as a size or color preference."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The customer's own photo of the item, shown in place of the product image, or null if they added none or the store has photos switched off."
},
"purchasedQuantity": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "How many have already been bought, never more than the customer asked for."
},
"purchases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "The note the buyer left, or an empty string."
},
"purchasedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the purchase was recorded."
}
},
"required": ["note", "purchasedAt"],
"additionalProperties": false
},
"description": "Each purchase recorded against the item, oldest first."
},
"priceCents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
],
"description": "The item's stored price in cents, or null when unknown or hidden."
},
"currencyCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The currency of `priceCents` as an ISO 4217 code, or null when unknown or hidden."
},
"product": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The product's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's main image."
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the product's page on the storefront, or null if it is not known."
}
},
"required": ["title", "imageUrl", "url"],
"additionalProperties": false
},
"variant": {
"anyOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The variant's display name."
},
"imageUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "URL of the variant's image."
}
},
"required": ["title", "imageUrl"],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "The variant the customer saved, or null if they saved the product as a whole."
}
},
"required": [
"id",
"quantity",
"note",
"imageUrl",
"purchasedQuantity",
"purchases",
"priceCents",
"currencyCode",
"product",
"variant"
],
"additionalProperties": false
},
"description": "The wishlist's items, newest first."
}
},
"required": ["name", "ownerFirstName", "showPrices", "purchaseMarkingEnabled", "items"],
"additionalProperties": false,
"description": "The shared list as it now reads."
}