Share by email
curl --request POST \
--url https://{host}/api/v1/wishlists/{wishlistId}/shares \
--header 'Content-Type: application/json' \
--header 'X-Shopify-ApiKey: <api-key>' \
--header 'X-Shopify-CustomerId: <api-key>' \
--header 'X-Shopify-Shop: <api-key>' \
--data '
{
"recipients": [
"priya@example.com"
],
"variantIds": [
"44986123714613"
],
"senderName": "Asha",
"language": "en"
}
'const options = {
method: 'POST',
headers: {
'X-Shopify-ApiKey': '<api-key>',
'X-Shopify-Shop': '<api-key>',
'X-Shopify-CustomerId': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipients: ['priya@example.com'],
variantIds: ['44986123714613'],
senderName: 'Asha',
language: 'en'
})
};
fetch('https://{host}/api/v1/wishlists/{wishlistId}/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/wishlists/{wishlistId}/shares"
payload = {
"recipients": ["priya@example.com"],
"variantIds": ["44986123714613"],
"senderName": "Asha",
"language": "en"
}
headers = {
"X-Shopify-ApiKey": "<api-key>",
"X-Shopify-Shop": "<api-key>",
"X-Shopify-CustomerId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)import Foundation
let parameters = [
"recipients": ["priya@example.com"],
"variantIds": ["44986123714613"],
"senderName": "Asha",
"language": "en"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://{host}/api/v1/wishlists/{wishlistId}/shares")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Shopify-ApiKey": "<api-key>",
"X-Shopify-Shop": "<api-key>",
"X-Shopify-CustomerId": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"recipients\": [\n \"priya@example.com\"\n ],\n \"variantIds\": [\n \"44986123714613\"\n ],\n \"senderName\": \"Asha\",\n \"language\": \"en\"\n}")
val request = Request.Builder()
.url("https://{host}/api/v1/wishlists/{wishlistId}/shares")
.post(body)
.addHeader("X-Shopify-ApiKey", "<api-key>")
.addHeader("X-Shopify-Shop", "<api-key>")
.addHeader("X-Shopify-CustomerId", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"data": [
{
"email": "priya@example.com",
"ok": true,
"shareId": 689,
"emailed": true,
"state": "created"
}
],
"message": "Wishlist shared with 1 person",
"messageKey": "success_wishlist_shared",
"messageParams": {
"count": "1"
}
}{
"title": "Malformed request",
"status": 400,
"code": "MALFORMED_REQUEST",
"message": "wishlistId must be a number.",
"messageKey": null
}{
"title": "Unauthenticated",
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Invalid API Key",
"messageKey": null
}{
"title": "Guest disabled",
"status": 403,
"code": "GUEST_DISABLED",
"message": "Please log in to save items to your wishlist.",
"messageKey": "error_guest_login_required"
}{
"title": "Wishlist not found",
"status": 404,
"code": "WISHLIST_NOT_FOUND",
"message": "Wishlist not found",
"messageKey": "error_wishlist_not_found"
}{
"title": "Version retired",
"status": 410,
"code": "VERSION_RETIRED",
"message": "Please update the app to continue.",
"messageKey": "error_app_update_required"
}{
"title": "Validation failed",
"status": 422,
"code": "VALIDATION_FAILED",
"message": "name is required.",
"messageKey": null,
"errors": [
{
"field": "name",
"message": "name is required."
}
]
}{
"title": "Rate limited",
"status": 429,
"code": "RATE_LIMITED",
"message": "Too many requests. Please try again in a minute.",
"messageKey": "error_too_many_requests"
}{
"title": "Internal error",
"status": 500,
"code": "INTERNAL_ERROR",
"message": "Something went wrong. Please try again.",
"messageKey": "error_something_went_wrong"
}Sharing
Share by email
POST
/
wishlists
/
{wishlistId}
/
shares
Share by email
curl --request POST \
--url https://{host}/api/v1/wishlists/{wishlistId}/shares \
--header 'Content-Type: application/json' \
--header 'X-Shopify-ApiKey: <api-key>' \
--header 'X-Shopify-CustomerId: <api-key>' \
--header 'X-Shopify-Shop: <api-key>' \
--data '
{
"recipients": [
"priya@example.com"
],
"variantIds": [
"44986123714613"
],
"senderName": "Asha",
"language": "en"
}
'const options = {
method: 'POST',
headers: {
'X-Shopify-ApiKey': '<api-key>',
'X-Shopify-Shop': '<api-key>',
'X-Shopify-CustomerId': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
recipients: ['priya@example.com'],
variantIds: ['44986123714613'],
senderName: 'Asha',
language: 'en'
})
};
fetch('https://{host}/api/v1/wishlists/{wishlistId}/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/wishlists/{wishlistId}/shares"
payload = {
"recipients": ["priya@example.com"],
"variantIds": ["44986123714613"],
"senderName": "Asha",
"language": "en"
}
headers = {
"X-Shopify-ApiKey": "<api-key>",
"X-Shopify-Shop": "<api-key>",
"X-Shopify-CustomerId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)import Foundation
let parameters = [
"recipients": ["priya@example.com"],
"variantIds": ["44986123714613"],
"senderName": "Asha",
"language": "en"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://{host}/api/v1/wishlists/{wishlistId}/shares")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-Shopify-ApiKey": "<api-key>",
"X-Shopify-Shop": "<api-key>",
"X-Shopify-CustomerId": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"recipients\": [\n \"priya@example.com\"\n ],\n \"variantIds\": [\n \"44986123714613\"\n ],\n \"senderName\": \"Asha\",\n \"language\": \"en\"\n}")
val request = Request.Builder()
.url("https://{host}/api/v1/wishlists/{wishlistId}/shares")
.post(body)
.addHeader("X-Shopify-ApiKey", "<api-key>")
.addHeader("X-Shopify-Shop", "<api-key>")
.addHeader("X-Shopify-CustomerId", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"data": [
{
"email": "priya@example.com",
"ok": true,
"shareId": 689,
"emailed": true,
"state": "created"
}
],
"message": "Wishlist shared with 1 person",
"messageKey": "success_wishlist_shared",
"messageParams": {
"count": "1"
}
}{
"title": "Malformed request",
"status": 400,
"code": "MALFORMED_REQUEST",
"message": "wishlistId must be a number.",
"messageKey": null
}{
"title": "Unauthenticated",
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Invalid API Key",
"messageKey": null
}{
"title": "Guest disabled",
"status": 403,
"code": "GUEST_DISABLED",
"message": "Please log in to save items to your wishlist.",
"messageKey": "error_guest_login_required"
}{
"title": "Wishlist not found",
"status": 404,
"code": "WISHLIST_NOT_FOUND",
"message": "Wishlist not found",
"messageKey": "error_wishlist_not_found"
}{
"title": "Version retired",
"status": 410,
"code": "VERSION_RETIRED",
"message": "Please update the app to continue.",
"messageKey": "error_app_update_required"
}{
"title": "Validation failed",
"status": 422,
"code": "VALIDATION_FAILED",
"message": "name is required.",
"messageKey": null,
"errors": [
{
"field": "name",
"message": "name is required."
}
]
}{
"title": "Rate limited",
"status": 429,
"code": "RATE_LIMITED",
"message": "Too many requests. Please try again in a minute.",
"messageKey": "error_too_many_requests"
}{
"title": "Internal error",
"status": 500,
"code": "INTERNAL_ERROR",
"message": "Something went wrong. Please try again.",
"messageKey": "error_something_went_wrong"
}Authorizations
ApiKey & Shop & CustomerIdApiKey & Shop & SessionId
Store API key from Wishlist settings > API Settings.
The store's myshopify domain, e.g. your-store.myshopify.com.
Numeric Shopify customer id of a logged-in shopper. Verified against the store on every call.
Path Parameters
Numeric wishlist id.
Pattern:
^\d+$Body
application/json
Response
Every recipient unchanged