Sherpo customer API
Rich text fields come back as HTML in a closed format, wrapped in <rich-text version="1">, as stored once validated. Allowed: p, h1 (Title), h2 (Heading), h3 (Subheading), br; marks strong, em, u, s, sup, sub, code (b as strong, i as em, del as s, strike as s); a with href (http, https, mailto, tel, ftp, ftps, callto, sms, cid, xmpp, irc, ircs or a relative path), target="_blank"; span with style color or background-color (#rgb or #rrggbb); style text-align (left, center, right, justify) on p and h1 to h3; ul; ol (start); li (data-checked="true" or "false" for a task list); table, thead, tbody, tr, th, td (colspan, rowspan); pre with one code (class="language-<id>", the id one of bash, c, cpp, csharp, css, go, xml, java, javascript, json, kotlin, markdown, php, python, ruby, rust, sql, swift, typescript, yaml); blockquote; hr; details (open) with its summary first; figure with at most one figcaption, first or last; a link's rel (noopener, noreferrer, nofollow) is read and never stored. Images, videos, downloads and other blocks are <block type="…" props="{…JSON…}"></block> elements (no raw img or video); which types a field takes is in its description. Example:
Welcome
Start with the intro, then read the notes.
Watch the intro
Take the quiz
Why it works
Short lessons stick.
profile
- Reads the customer's profile.GET
/v1/stores/{store}/profile - Updates the customer's name and preferences.PATCH
/v1/stores/{store}/profile - Marks the named notifications read, or every unread one when none is named.POST
/v1/stores/{store}/notifications/read - Deletes the named notifications, read or not, or every read one when none is named.POST
/v1/stores/{store}/notifications/delete - Turns notification types on or off, for the notifications list and browser push alike.PATCH
/v1/stores/{store}/notification_settings - Allows a browser to receive the customer's notifications by push, as long as the session or token that adds it lasts.POST
/v1/stores/{store}/push_subscriptions - Moves the customer's subscription to the endpoint and keys its browser renewed it with, in one step, keeping what was pushed to it.POST
/v1/stores/{store}/push_subscriptions/renew - Stops pushing notifications to a browser.POST
/v1/stores/{store}/push_subscriptions/delete
contact
- Lists the customer's email address.GET
/v1/stores/{store}/contacts - Asks to change the customer's email address and mails the new one a code to prove it.POST
/v1/stores/{store}/contacts/change - Proves the new email address with the code mailed to it, replacing the customer's old one.POST
/v1/stores/{store}/contacts/verify
billing
checkout
- Removes one of the customer's saved payment methods, never one a subscription still renews on. Refused to an app the store hasn't verified: send the customer to /account/payment-methods on the store's site.DEL
/v1/stores/{store}/payment_methods/{instrument} - Makes one of the customer's saved payment methods their default, which their subscriptions renew on.PUT
/v1/stores/{store}/payment_methods/{instrument}/default - Pages the customer's checkouts.GET
/v1/stores/{store}/checkouts - Opens a cart in one currency.POST
/v1/stores/{store}/checkouts - Reads one of the customer's checkouts.GET
/v1/stores/{store}/checkouts/{checkout} - Puts a price in a cart at the offer the customer gets now; zero removes the line.PUT
/v1/stores/{store}/checkouts/{checkout}/items - Names a coupon on a cart, or takes it off with null.PUT
/v1/stores/{store}/checkouts/{checkout}/coupon - Presents a cart for payment: its lines must still price as frozen, then it stops changing.POST
/v1/stores/{store}/checkouts/{checkout}/freeze - Gives a cart up; a frozen one hands its coupons back.POST
/v1/stores/{store}/checkouts/{checkout}/abandon - Starts paying a frozen cart, answering what the buyer's page confirms with the processor, or the order when nothing is due.POST
/v1/stores/{store}/checkouts/{checkout}/pay - Reads a cart's payment back after the buyer's page confirmed it, answering the order once it is paid.POST
/v1/stores/{store}/checkouts/{checkout}/confirm
store
product
entry
page
body
prompt
- Lists the MCP prompts of one product, or of every product the customer holds, with what each asks, the tier it requires and whether the customer may run it; without a customer, a product is required.GET
/v1/stores/{store}/prompts - Reads one prompt by its id or name, its text filled in with the arguments given where the customer may run it.GET
/v1/stores/{store}/prompts/{prompt}
attachment
video
progress
completion
notification
push
order
- Pages the customer's orders.GET
/v1/stores/{store}/orders - Reads one of the customer's orders.GET
/v1/stores/{store}/orders/{order} - Links the receipt of one of the customer's paid orders, a link that expires.GET
/v1/stores/{store}/orders/{order}/receipt - Pages an order's lines.GET
/v1/stores/{store}/orders/{order}/items - Pages an order's refunds.GET
/v1/stores/{store}/orders/{order}/refunds
subscription
- Pages the customer's subscriptions.GET
/v1/stores/{store}/subscriptions - Reads one of the customer's subscriptions.GET
/v1/stores/{store}/subscriptions/{subscription} - Cancels a subscription at the end of its period, or at once when every payment of it was refunded.POST
/v1/stores/{store}/subscriptions/{subscription}/cancel - Withdraws a subscription's scheduled cancellation; one whose saved card is gone renews on the default card, or the only one saved. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.POST
/v1/stores/{store}/subscriptions/{subscription}/resume - Schedules a subscription to renew on a lower tier or a shorter period from the end of its paid period; its current price takes the change back. Refused to an app the store hasn't verified: send the customer to /account/subscriptions on the store's site.PUT
/v1/stores/{store}/subscriptions/{subscription}/plan
grant
entitlement
review
- Pages a product's reviews.GET
/v1/stores/{store}/products/{product}/reviews - Reads the customer's own review of a product.GET
/v1/stores/{store}/products/{product}/review - Writes or updates the customer's review of a product.PUT
/v1/stores/{store}/products/{product}/review - Deletes the customer's review.DEL
/v1/stores/{store}/products/{product}/review
quiz
- Starts an attempt at a quiz, or resumes the open one, until the quiz is over: given up, its attempts used, or one attempt scored 100.POST
/v1/stores/{store}/quizzes/{quiz}/attempts - Submits answers to an attempt and grades it.POST
/v1/stores/{store}/attempts/{attempt}/submit - Saves the answers given so far to the open attempt, replacing those saved before, so it resumes on any device.POST
/v1/stores/{store}/attempts/{attempt}/save - Gives up a quiz: the open attempt, or the attempts left, after which no attempt can be started.POST
/v1/stores/{store}/quizzes/{quiz}/forfeit
attempt
certificate
- Pages the certificates issued to the customer.GET
/v1/stores/{store}/certificates - Reads one certificate issued to the customer.GET
/v1/stores/{store}/certificates/{certificate} - Checks that a certificate was issued and is not revoked, and given `of`, that it is one of that certificate.GET
/v1/stores/{store}/certificates/{certificate}/verify
portfolio
- Reads a portfolio product's book, as far as the customer may.GET
/v1/stores/{store}/products/{product}/portfolio - Values a portfolio at live quotes and prices its watchlist, for a customer with access.GET
/v1/stores/{store}/products/{product}/portfolio_valuation - Pages a portfolio's events.GET
/v1/stores/{store}/products/{product}/portfolio_events - Pages a portfolio's daily snapshots.GET
/v1/stores/{store}/products/{product}/portfolio_snapshots