{"id":23490100,"url":"https://github.com/dlerm/shopify-wishlist-app","last_synced_at":"2025-04-15T04:30:59.287Z","repository":{"id":43167462,"uuid":"424491963","full_name":"dlerm/shopify-wishlist-app","owner":"dlerm","description":"💚 A Shopify Wishlist App back-end that can be used in addition to the Shopify Wishlist theme files.","archived":false,"fork":false,"pushed_at":"2021-11-04T06:55:16.000Z","size":33,"stargazers_count":17,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-28T15:51:58.567Z","etag":null,"topics":["api","app","backend","express","javascript","metafields","node","shopify","wishlist"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlerm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-04T06:20:00.000Z","updated_at":"2024-12-28T06:41:27.000Z","dependencies_parsed_at":"2022-09-05T02:41:57.407Z","dependency_job_id":null,"html_url":"https://github.com/dlerm/shopify-wishlist-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fshopify-wishlist-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fshopify-wishlist-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fshopify-wishlist-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fshopify-wishlist-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlerm","download_url":"https://codeload.github.com/dlerm/shopify-wishlist-app/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006367,"owners_count":21197260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","app","backend","express","javascript","metafields","node","shopify","wishlist"],"created_at":"2024-12-25T00:18:45.030Z","updated_at":"2025-04-15T04:30:59.270Z","avatar_url":"https://github.com/dlerm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Shopify Wishlist App\n\nA Shopify Wishlist App that can be used seamlessly with the [Shopify Wishlist](https://github.com/dlerm/shopify-wishlist) theme files.\n\n### Overview\nThis is a back-end solution meant for usage as a Shopify private app. The app saves customer wishlists into metafields to avoid the need for an external data store.\n\n### How It Works\nThe app creates \u0026 updates a customer metafield that stores a string list of product handles (comma separated).\n\n|Metafield | Value |\n|----------|-------|\n|customer.metafields.shopify_wishlist_app.wishlist|\"product-handle-1,product-handle2,...\"\n\nThe front-end can make requests to the app's endpoints to fetch, create, update or delete a wishlist.\n\n### How To Use\n\n1. Host this app on a server of your choice\n2. Setup your server's environment variables\n3. Query the app endpoints (via Javascript) from your Shopify theme to display or manipulate a customer's wishlist\n\n##### ENV Setup\n```\n# Origins/URLs that are allowed to make App/API requests\n# Inlcude the http/https protocols\n# Comma separated for multiple origins\nALLOWED_ORIGINS=https://customer-wishlist.myshopify.com\n\n# The \"myshopify\" domain without the \"myshopify.com\" ending\nSHOPIFY_DOMAIN=customer-wishlist\n\n# Shopify private app key\nAPI_KEY=xxxxxxxxxxxxxxxxxxx\n\n# Shopify private app password/secret\nAPI_PASSWORD=xxxxxxxxxxxxxxxxxxx\n```\n\n### Request Endpoints\n\nAll endpoints require a single `:id` parameter in the URL which should represent a unique Shopify customer ID. Each request type may have extra data needed to fulfill the request, see below.\n\n##### GET `/wishlist/:id`\n---\n**Query Parameters**\n|Name|Required|Description|\n|----:|:----:|----|\n|format|optional|The format of the wishlist items to be returned. \u003cbr/\u003e\u003cbr/\u003e Supported value: `product` \u003cbr/\u003e\u003cbr/\u003e By default the wishlist will be returned as an `Array\u003cstring\u003e` representing the product handles. Supplying the value `product` will return the wishlist as an `Array\u003cobject\u003e` representing the full [Shopify product JSON](https://shopify.dev/api/admin-rest/2021-10/resources/product#[get]/admin/api/2021-10/products/{product_id}.json). |\n\n**Response (Default)**\n```\n{\n    \"id\": \u003ccustomer-id\u003e,\n    \"wishlist\": [\n        \"\u003cproduct-handle\u003e\",\n        \"\u003cproduct-handle\u003e\",\n        ...\n    ],\n    \"metafield\": {\n        \"id\": \u003cmetafield-id\u003e,\n        \"namespace\": \"shopify_wishlist_app\",\n        \"key\": \"wishlist\",\n        \"value\": \"\u003cproduct-handle\u003e,\u003cproduct-handle\u003e,...\",\n        \"value_type\": \"string\",\n        \"description\": null,\n        \"owner_id\": \u003ccustomer-id\u003e,\n        \"created_at\": \u003cdate\u003e,\n        \"updated_at\": \u003cdate\u003e\n        \"owner_resource\": \"customer\",\n        \"admin_graphql_api_id\": \"gid://shopify/Metafield/\u003cmetafield-id\u003e\"\n    },\n    \"status\": {\n        \"message\": \"OK\",\n        \"code\": 200\n    }\n}\n```\n**Response (Format: `product`)**\n\n[Only displaying the `wishlist` response key for brevity]\n```\n{\n    \"wishlist\": [\n        { \u003cshopify-product-JSON\u003e },\n        { \u003cshopify-product-JSON\u003e },\n        ...\n    ],\n    ...\n}\n```\n\n##### POST `/wishlist/:id`\n---\n**Body Parameters**\n|Name|Required|Description|\n|----:|:----:|----|\n|handle|required|The Shopify product handle that should be added/removed from the wishlist. \u003cbr/\u003e\u003cbr/\u003e This endpoint acts as a toggle. If the requested handle does not currently exist in the wishlist, add it, otherwise remove it.|\n\n**Response**\n```\n{\n    \"metafield\": {\n        \"namespace\": \"shopify_wishlist_app\",\n        \"key\": \"wishlist\",\n        \"value_type\": \"string\",\n        \"value\": \"\u003cnew-product-handle\u003e,\u003cproduct-handle\u003e,...\"\n    },\n    \"status\": {\n        \"message\": \"OK\",\n        \"code\": 200\n    }\n}\n```\n##### DELETE `/wishlist/:id`\n---\n**Parameters** - None\n\n**Response**\n```\n{\n    \"metafield\": {},\n    \"status\": {\n        \"message\": \"OK\",\n        \"code\": 200\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlerm%2Fshopify-wishlist-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlerm%2Fshopify-wishlist-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlerm%2Fshopify-wishlist-app/lists"}