Shop API
E-commerce: products, collections, orders, discounts, and storefront.
| Endpoint | POST https://shop.api.gist.link/graphql |
| Token audience | audience=shop |
| Permission prefix | shop: |
Mint an access token for this API with your IAM key and audience=shop
— see Authentication.
Queries
Section titled “Queries”| Operation | Required permission | Description |
|---|---|---|
cart |
shop:query:cart |
A cart by its opaque token. PUBLIC. |
collection |
shop:query:collection |
A single collection by uuid. ADMIN. |
collectionByHandle |
shop:query:collectionByHandle |
A single collection by its storefront handle (with its active products). PUBLIC. |
collections |
shop:query:collections |
Collections for the caller’s organization. ADMIN. |
customer |
shop:query:customer |
A single customer by uuid. ADMIN. (shop has no customer list — customers live in crm.) |
discounts |
shop:query:discounts |
Discount codes for the organization. ADMIN. |
inventoryLevels |
shop:query:inventoryLevels |
Inventory levels for the organization, optionally scoped to one location. ADMIN. |
inventoryReceipts |
shop:query:inventoryReceipts |
Stock receiving history (newest first). ADMIN. |
order |
shop:query:order |
A single order by uuid. ADMIN. |
orders |
shop:query:orders |
Cursor-paginated orders for the caller’s organization. ADMIN. |
orderShippingRates |
shop:query:orderShippingRates |
Live label rates for a paid order from the shipping service: ship-from = fromLocationUuid (a settings ship-from location) or, when omitted, shipping’s default origin (settings default ship-from → first ships_from location → business address); ship-to = the order’s snapshot (plus the matching CRM address uuid when the buyer’s CRM contact has it saved); parcels from the order, filtered to the customer’s chosen carrier unless allCarriers. The rate matching the customer’s carrier + service level is flagged recommended. ADMIN. |
orderStatus |
shop:query:orderStatus |
Public order status/receipt lookup by order uuid (no admin fields). PUBLIC. |
product |
shop:query:product |
A single product by uuid. ADMIN. |
productByHandle |
shop:query:productByHandle |
A single ACTIVE product by its storefront handle. PUBLIC. |
products |
shop:query:products |
Cursor-paginated products for the caller’s organization (all statuses). ADMIN. |
settingsLocations |
shop:query:settingsLocations |
The org’s own locations from the settings service (settings owns their addresses) — the picker for a shop location’s settings_location_uuid and the label ship-from. ships_from filters to shipping origins. ADMIN. |
shippingLabelFile |
shop:query:shippingLabelFile |
A fulfillment’s label file (base64), fetched from the shipping service. ADMIN. |
shippingZones |
shop:query:shippingZones |
LEGACY flat shipping zones (no longer used for checkout — shipping is chosen in pay’s checkout with rates from the shipping service). Kept read/write until app:shipping:export-zones has moved them to shipping’s custom rate tables and the cleanup migration drops them. ADMIN. |
storefrontProducts |
shop:query:storefrontProducts |
Public product listing for a store — ACTIVE products only. The store is identified by its organization uuid (storeId). No admin data is ever exposed. PUBLIC. |
taxRates |
shop:query:taxRates |
Tax rates for the organization. ADMIN. |
Mutations
Section titled “Mutations”| Operation | Required permission | Description |
|---|---|---|
adjustInventory |
shop:mutation:adjustInventory |
Set the absolute on-hand quantity of a variant at a location. ADMIN. |
archiveProduct |
shop:mutation:archiveProduct |
Archive a product (status -> archived). ADMIN. |
buyShippingLabel |
shop:mutation:buyShippingLabel |
Buy a shipping label (shipping purchaseLabel) for a rate from orderShippingRates and record it as a fulfillment (carrier, tracking, label). Order status -> fulfilled. ADMIN. |
cancelOrder |
shop:mutation:cancelOrder |
Cancel a pending order (payment not yet completed). ADMIN. |
cartApplyDiscount |
shop:mutation:cartApplyDiscount |
Apply (or clear, when code is null) a discount code on a cart. PUBLIC. |
cartCreate |
shop:mutation:cartCreate |
Create a new empty cart for a store. PUBLIC. |
cartLinesAdd |
shop:mutation:cartLinesAdd |
Add a variant (by uuid) to a cart. PUBLIC. |
cartLinesRemove |
shop:mutation:cartLinesRemove |
Remove a cart line (by line uuid). PUBLIC. |
cartLinesUpdate |
shop:mutation:cartLinesUpdate |
Change the quantity of a cart line (by line uuid). PUBLIC. |
checkoutStart |
shop:mutation:checkoutStart |
Begin checkout for a cart: compute totals (tax/discount) in integer minor units, create a pending Order snapshotting the cart lines, open a pay checkout session (requiresShipping + parcels + sourceRef shop:order:<uuid>) and return the hosted checkout URL. Shipping is NOT computed here: pay’s checkout collects the address and the shipping rate before payment. shippingAddress is optional and only used to pick the tax rate. PUBLIC. |
createCollection |
shop:mutation:createCollection |
Create a collection. ADMIN. |
createDiscount |
shop:mutation:createDiscount |
Create a discount code. ADMIN. |
createLocation |
shop:mutation:createLocation |
Create a stocking / fulfillment location. ADMIN. |
createProduct |
shop:mutation:createProduct |
Create a draft product. ADMIN. |
createShippingZone |
shop:mutation:createShippingZone |
Create a shipping zone. ADMIN. |
createTaxRate |
shop:mutation:createTaxRate |
Create a tax rate. ADMIN. |
createVariant |
shop:mutation:createVariant |
Add a variant to a product. ADMIN. |
deleteCollection |
shop:mutation:deleteCollection |
Delete a collection; returns the deleted row. ADMIN. |
deleteDiscount |
shop:mutation:deleteDiscount |
Delete a discount code; returns the deleted row. ADMIN. |
deleteShippingZone |
shop:mutation:deleteShippingZone |
Delete a shipping zone; returns the deleted row. ADMIN. |
deleteTaxRate |
shop:mutation:deleteTaxRate |
Delete a tax rate; returns the deleted row. ADMIN. |
deleteVariant |
shop:mutation:deleteVariant |
Delete a variant. ADMIN. |
fulfillOrder |
shop:mutation:fulfillOrder |
Record a fulfillment (shipment) against a paid order (status -> fulfilled). ADMIN. |
publishProduct |
shop:mutation:publishProduct |
Publish a product (status -> active). ADMIN. |
refundOrder |
shop:mutation:refundOrder |
Refund a paid order through the pay service (refundPayment). Records a Refund; fully refunds the order status when the whole total is refunded. ADMIN. |
setProductOptions |
shop:mutation:setProductOptions |
Replace a product’s options (and their values) wholesale. ADMIN. |
updateCollection |
shop:mutation:updateCollection |
Update a collection. ADMIN. |
updateDiscount |
shop:mutation:updateDiscount |
Update a discount code. ADMIN. |
updateLocation |
shop:mutation:updateLocation |
Update a location. ADMIN. |
updateProduct |
shop:mutation:updateProduct |
Update a product’s core fields. ADMIN. |
updateShippingZone |
shop:mutation:updateShippingZone |
Update a shipping zone (rates replaced wholesale). ADMIN. |
updateTaxRate |
shop:mutation:updateTaxRate |
Update a tax rate. ADMIN. |
updateVariant |
shop:mutation:updateVariant |
Update a variant. ADMIN. |
voidShippingLabel |
shop:mutation:voidShippingLabel |
Void a fulfillment’s unused label (shipping voidLabel). ADMIN. |
Internal operations
Section titled “Internal operations”The following operations exist in the schema but are reserved for internal
suite automation (service tokens or suite operators) and are not available
to IAM credentials: locations, catalogVariants, customerStats, receiveInventory, applyShippingTrackingUpdate.