Plutocracy
MercuryJuno
  • Welcome
  • Our Apps
  • Mercury
    • Quick Start
    • Endpoints
  • Juno
    • Quick Start
    • Related Products
      • Widgets
    • Preorder/Backorder
  • Cupid
    • Quick Start
    • Endpoints
  • Working with Plutocracy
    • Development Philosophy
    • Support
Powered by GitBook
On this page
  1. Cupid

Endpoints

PreviousQuick StartNextDevelopment Philosophy

Last updated 3 months ago

Don't be that person

Most of our endpoints use "POST" requests to keep transmission of sensitive data secure - but this service is not to be used for storing any personal data - and is up to you the developer to make sure that your experience conforms with this requirement.

Fetch a stores Id {storeId}

Cupid exposes an active store id for a given myShopify domain.

Fetch a wishlist by a users Email

Returns a complete wishlist for a provided email.

Fetch a wishlist by a wishlist Id

This is our default experience endpoint for non authenticated users, typically we recommend storing a wishlist Id in localstorage and fetching the wishlist at the beginning of the browsing session for SPA's

Delete a wishlist by a wishlist Id

Delete a wishlist and all of its events, not to be confused with "tombstone"-ing a wishlist which will clear the public history of a given wishlist, but keep the id.

Create an event on a wishlist

Submitting an event without providing a wishlist Id will create a wishlist and return the id for you to store client side.

This is the default experience, you can provide any eventType for your own purposes, but we have some protected events that provide certain functionality. Cupid stores wishlists as a timeseries of events, and accepts freeform event bodies, allowing developers to build highly flexible experiences.

Reserved events include:

wishlist/add

Will add a product to a rendered wishlist

wishlist/remove

Will remove a product from a rendered wishlist

Wishlist prefixed events are deduplicated when a wishlist is rendered, returning only the current status of the wishlist, if you send 3 wishlist/add events for a given object Id, you will only receive the latest event. If an object has been removed from a wishlist after it is added, no reference to that will be returned.

email/add

Will add an email to a rendered withlist

tombstone

Will hide all events that took place before the tombstone event, perfect for a "clear wishlist" button.

We strongly recommend you do not send Cupid any sensitive customer information - we do try to take every precaution, but will not be held responsible if you send a wishlist information of a personal nature.

get
Responses
200
An active store Id
application/json
get
GET /wishlist/storeid/{storeMyshopifyDomain} HTTP/1.1
Host: wishlist.plutocracy.io
Accept: */*
200

An active store Id

{
  "id": "text"
}
post
Responses
201
An active Wishlist for a given user Email
application/json
post
POST /wishlist/email/{storeId} HTTP/1.1
Host: wishlist.plutocracy.io
Accept: */*
201

An active Wishlist for a given user Email

{
  "wishlistId": "text",
  "name": "text",
  "customerId": "text",
  "number": "text",
  "events": [
    {
      "eventType": "wishlist/add",
      "objectId": "text",
      "metaBody": {
        "variantId": "text",
        "quantity": "text",
        "price": "text"
      },
      "eventBody": {}
    }
  ]
}
post
Responses
200
An active Wishlist for a given Wishlist Id
application/json
post
POST /wishlist/id/{storeId} HTTP/1.1
Host: wishlist.plutocracy.io
Accept: */*
200

An active Wishlist for a given Wishlist Id

{
  "wishlistId": "text",
  "name": "text",
  "customerId": "text",
  "number": "text",
  "events": [
    {
      "eventType": "wishlist/add",
      "objectId": "text",
      "metaBody": {
        "variantId": "text",
        "quantity": "text",
        "price": "text"
      },
      "eventBody": {}
    }
  ]
}
delete
Path parameters
storeIdstringRequired
wishlistIdstringRequired
Responses
200
Delete a Wishlist
delete
DELETE /wishlist/event/{storeId}/{wishlistId} HTTP/1.1
Host: wishlist.plutocracy.io
Accept: */*
200

Delete a Wishlist

No content

  • Don't be that person
  • Fetch a stores Id {storeId}
  • GET/wishlist/storeid/{storeMyshopifyDomain}
  • Fetch a wishlist by a users Email
  • POST/wishlist/email/{storeId}
  • Fetch a wishlist by a wishlist Id
  • POST/wishlist/id/{storeId}
  • Delete a wishlist by a wishlist Id
  • DELETE/wishlist/event/{storeId}/{wishlistId}
  • Create an event on a wishlist
  • POST/wishlist/event/{storeId}
post
Body
storeIdstringRequired
eventobjectRequired
eventTypeall ofRequired
string ยท enumOptionalPossible values:
metaall of | nullableRequired
wishlistIdstring | nullableRequired
emailstring | nullableRequired
namestring | nullableRequired
Responses
201Success
post
POST /wishlist/event/{storeId} HTTP/1.1
Host: wishlist.plutocracy.io
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "storeId": "text",
  "event": {},
  "eventType": "wishlist/add",
  "meta": {
    "variantId": "text",
    "quantity": "text",
    "price": "text"
  },
  "wishlistId": "text",
  "email": "text",
  "name": "text"
}
201Success

No content