Shopify
SDK reference for shopify operations
Overview
Shopify store management — products, orders, customers, inventory, collections, pages, blogs, articles, themes, menus, redirects, and discount codes
- Category:
commerce - Auth Required: Yes
- Supported Modes: standard, delegated
Operations
updateVariant
Update a single product variant — price, compare-at price, SKU, barcode, taxability, inventory policy, and variant option values. Variant edits are product-scoped in the Shopify Admin API, so both productId and variantId are required. Use inventoryPolicy "continue" to keep selling a variant when it is out of stock, or "deny" to stop selling it when inventory reaches zero.
Arguments:
productId(string, required): The ID of the product the variant belongs to.variantId(string, required): The ID of the variant to update.price(string, optional): New price as a decimal string (e.g. "19.99").compareAtPrice(string, optional): New compare-at ("was") price as a decimal string. Pass an empty string to clear it.sku(string, optional): New SKU (stock keeping unit) for the variant.barcode(string, optional): New barcode (ISBN, UPC, GTIN, etc.) for the variant.taxable(boolean, optional): Whether the variant is subject to tax.inventoryPolicy(string, optional): Inventory policy: "continue" to keep selling when out of stock, or "deny" to stop selling when out of stock.options(array, optional): New variant option values in order (e.g. ["Large", "Red"]) to replace the variant's current option values. Must match the number of product options.
Returns:
ShopifyVariant - Returns the updated variant with id, title, price, compareAtPrice, sku, inventoryQuantity, inventoryPolicy, option values, barcode, and taxable.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Variant ID |
title | string | Variant title |
price | string | Price |
compareAtPrice | string | Compare-at price (optional) |
sku | string | SKU |
inventoryQuantity | number | Inventory quantity |
inventoryItemId | string | Inventory item ID (for inventory operations) (optional) |
option1 | string | Option 1 value (optional) |
option2 | string | Option 2 value (optional) |
option3 | string | Option 3 value (optional) |
barcode | string | Barcode (optional) |
taxable | boolean | Is taxable |
inventoryPolicy | string | Inventory policy: "continue" (keep selling when out of stock) or "deny" (stop selling when out of stock) (optional) |
Example:
refundOrder
Refund an order — either specific line items (partial refund) or all refundable items. Money is actually returned to the customer: the operation computes the suggested refund (transactions, taxes, and amounts) for the requested items, then creates the refund against the original payment. Optionally restock the refunded items and refund shipping.
Arguments:
orderId(string, required): The ID of the order to refund.lineItems(array, optional): Line items to refund, each an object { lineItemId: string, quantity: number }. Omit to refund all remaining refundable items on the order.refundShipping(boolean, optional): Whether to also refund the full remaining shipping amount. Defaults to false.note(string, optional): An optional note describing the reason for the refund (shown in the Shopify admin).notify(boolean, optional): Whether to send the customer a refund notification email. Defaults to false.restock(boolean, optional): Whether to restock the refunded items back into inventory. Defaults to true.
Returns:
ShopifyRefund - Returns the created refund: { id, orderId, note, totalRefunded, currency, createdAt }.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Refund ID |
orderId | string | ID of the refunded order |
note | string | Refund note, or null (optional) |
totalRefunded | string | Total amount refunded |
currency | string | Currency code of the refund, or null (optional) |
createdAt | string | Refund creation timestamp (ISO 8601) |
Example:
fulfillOrder
Fulfill an order (mark items as shipped) and optionally attach tracking. Fulfills either specific line items (split/partial fulfillment) or all remaining unfulfilled items. Resolves the order's fulfillment orders automatically. Tracking number, carrier, and URL are optional; set notifyCustomer to email the customer a shipping confirmation.
Arguments:
orderId(string, required): The ID of the order to fulfill.lineItems(array, optional): Line items to fulfill, each an object { lineItemId: string, quantity: number }. Omit to fulfill all remaining unfulfilled items.trackingNumber(string, optional): Tracking number for the shipment.trackingCompany(string, optional): Shipping carrier name (e.g. "UPS", "USPS", "FedEx").trackingUrl(string, optional): A URL where the customer can track the shipment.notifyCustomer(boolean, optional): Whether to send the customer a shipping notification email. Defaults to false.
Returns:
ShopifyFulfillment - Returns the created fulfillment: { id, orderId, status, trackingNumber, trackingCompany, trackingUrl, createdAt }.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Fulfillment ID |
orderId | string | ID of the fulfilled order |
status | string | Fulfillment status (e.g. success, cancelled) |
trackingNumber | string | Tracking number, or null (optional) |
trackingCompany | string | Shipping carrier, or null (optional) |
trackingUrl | string | Tracking URL, or null (optional) |
createdAt | string | Fulfillment creation timestamp (ISO 8601) |
Example:
updateFulfillmentTracking
Update the tracking information on an existing fulfillment (for example to add a tracking number after the fact, correct the carrier, or replace the tracking URL). Optionally notify the customer of the updated tracking.
Arguments:
fulfillmentId(string, required): The ID of the fulfillment to update.trackingNumber(string, optional): The tracking number to set on the fulfillment.trackingCompany(string, optional): Shipping carrier name (e.g. "UPS", "USPS", "FedEx").trackingUrl(string, optional): A URL where the customer can track the shipment.notifyCustomer(boolean, optional): Whether to send the customer an updated-tracking notification email. Defaults to false.
Returns:
ShopifyFulfillment - Returns the updated fulfillment: { id, orderId, status, trackingNumber, trackingCompany, trackingUrl, createdAt }.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Fulfillment ID |
orderId | string | ID of the fulfilled order |
status | string | Fulfillment status (e.g. success, cancelled) |
trackingNumber | string | Tracking number, or null (optional) |
trackingCompany | string | Shipping carrier, or null (optional) |
trackingUrl | string | Tracking URL, or null (optional) |
createdAt | string | Fulfillment creation timestamp (ISO 8601) |
Example:
createCollection
Create a manual (custom) collection — a hand-picked grouping of products. Supports a theme template suffix (e.g. "preview" or "landing") so the collection can render with a custom theme template, and a visibility flag that publishes (or hides) the collection on the Online Store sales channel. Products are added separately via addProductsToCollection; a product can belong to multiple collections at once.
Arguments:
title(string, required): The collection title.descriptionHtml(string, optional): The collection description as HTML.templateSuffix(string, optional): Theme template suffix to render the collection with a custom template, e.g. "preview" renders templates/collection.preview.liquid. Omit for the default template.published(boolean, optional): Whether the collection is visible on the Online Store sales channel. true publishes it, false hides it. Defaults to false.sortOrder(string, optional): How products are ordered within the collection (e.g. "MANUAL", "BEST_SELLING", "ALPHA_ASC", "PRICE_DESC", "CREATED").imageUrl(string, optional): URL of an image to use as the collection image.imageAlt(string, optional): Alt text for the collection image.
Returns:
ShopifyCollection - Returns the created collection with id, title, bodyHtml, handle, sortOrder, collectionType ("custom"), imageUrl, and productsCount.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Collection ID |
title | string | Collection title |
bodyHtml | string | HTML description |
handle | string | URL handle |
sortOrder | string | Sort order |
publishedAt | string | Published timestamp (optional) |
updatedAt | string | Last update timestamp |
collectionType | string | Type: "custom" or "smart" |
imageUrl | string | Collection image URL (optional) |
imageAlt | string | Image alt text (optional) |
productsCount | number | Number of products in collection (optional) |
Example:
updateCollection
Update a manual (custom) collection — title, description, theme template suffix, sort order, image, and visibility on the Online Store sales channel. Only the provided fields are changed.
Arguments:
collectionId(string, required): The ID of the collection to update.title(string, optional): New collection title.descriptionHtml(string, optional): New collection description as HTML.templateSuffix(string, optional): New theme template suffix (e.g. "preview" / "landing"). Pass an empty string to reset to the default template.published(boolean, optional): Whether the collection is visible on the Online Store sales channel. true publishes it, false hides it.sortOrder(string, optional): How products are ordered within the collection (e.g. "MANUAL", "BEST_SELLING", "ALPHA_ASC", "PRICE_DESC", "CREATED").imageUrl(string, optional): New collection image URL.imageAlt(string, optional): New alt text for the collection image.
Returns:
ShopifyCollection - Returns the updated collection with id, title, bodyHtml, handle, sortOrder, collectionType, imageUrl, and productsCount.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Collection ID |
title | string | Collection title |
bodyHtml | string | HTML description |
handle | string | URL handle |
sortOrder | string | Sort order |
publishedAt | string | Published timestamp (optional) |
updatedAt | string | Last update timestamp |
collectionType | string | Type: "custom" or "smart" |
imageUrl | string | Collection image URL (optional) |
imageAlt | string | Image alt text (optional) |
productsCount | number | Number of products in collection (optional) |
Example:
deleteCollection
Delete a collection. This removes the collection grouping only — the products that belonged to it are not deleted.
Arguments:
collectionId(string, required): The ID of the collection to delete.
Returns:
object - Returns { deleted: true, collectionId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
collectionId | string | Deleted collection ID |
Example:
addProductsToCollection
Add one or more products to a manual (custom) collection. This is additive — a product keeps its membership in any other collections (e.g. its category collection) and also joins this one, so the same product can appear in multiple collections at once.
Arguments:
collectionId(string, required): The ID of the collection to add products to.productIds(array, required): Array of product IDs to add to the collection.
Returns:
object - Returns { collectionId, productIds, added: true }.
Response Fields:
| Field | Type | Description |
|---|---|---|
collectionId | string | Collection ID |
productIds | array | Product IDs added to the collection |
added | boolean | Whether the products were added |
Example:
removeProductsFromCollection
Remove one or more products from a manual (custom) collection. The products themselves are not deleted and remain in any other collections they belong to.
Arguments:
collectionId(string, required): The ID of the collection to remove products from.productIds(array, required): Array of product IDs to remove from the collection.
Returns:
object - Returns { collectionId, productIds, removed: true }.
Response Fields:
| Field | Type | Description |
|---|---|---|
collectionId | string | Collection ID |
productIds | array | Product IDs removed from the collection |
removed | boolean | Whether the products were removed |
Example:
publishCollection
Publish or unpublish an existing collection on the Online Store sales channel, making it visible (or hidden) on the storefront. Use this to make a collection live after creating it, or to retry publishing a collection that was created but not yet published (e.g. when createCollection succeeded but its publish step was skipped). Requires the read_publications and write_publications scopes — if the store has not granted them, the merchant must reconnect Shopify and approve the expanded permissions before publishing will work.
Arguments:
collectionId(string, required): The ID of the collection to publish or unpublish.published(boolean, optional): true (the default) publishes the collection on the Online Store sales channel; false unpublishes (hides) it from the storefront.
Returns:
object - Returns { collectionId, published }.
Example:
listProducts
List products in the Shopify store with optional filtering and pagination. Returns up to 50 products per page. Use the nextPageInfo cursor from the response to fetch subsequent pages.
Arguments:
limit(number, optional): Number of products to return per page (1-250). Defaults to 50.pageInfo(string, optional): Cursor for pagination. Use the nextPageInfo value from a previous response to get the next page.status(string, optional): Filter by product status: "active", "archived", or "draft".vendor(string, optional): Filter by product vendor name.productType(string, optional): Filter by product type.collectionId(string, optional): Filter by collection ID to list products in a specific collection.
Returns:
AdapterOperationResult - Returns { products: NormalizedShopifyProduct[], nextPageInfo, previousPageInfo, totalRetrieved }. Each product includes id, title, bodyHtml, vendor, productType, status, handle, tags, variants, images, options.
Response Fields:
| Field | Type | Description |
|---|---|---|
products | ShopifyNormalizedProduct[] | List of products |
products item fields (ShopifyNormalizedProduct)
| Field | Type | Description |
|---|---|---|
id | string | Product ID |
title | string | Product title |
bodyHtml | string | HTML description |
vendor | string | Vendor name |
productType | string | Product type |
status | string | Status (active, archived, draft) |
handle | string | URL handle |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
publishedAt | string | Published timestamp (ISO 8601) (optional) |
variants | ShopifyVariant[] | Product variants |
images | ShopifyImage[] | Product images |
templateSuffix | string | Template suffix for custom templates (optional) |
publishedScope | string | Published scope (e.g., web) |
options | object[] | Product options (e.g., Size, Color) with id, name, values[] |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of products retrieved |
Example:
getProduct
Get a single product by its Shopify product ID. Returns full product details including all variants, images, and options.
Arguments:
productId(string, required): The Shopify product ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyProduct with id, title, bodyHtml, vendor, productType, status, handle, tags, variants (with price, sku, inventory), images, and options.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Product ID |
title | string | Product title |
bodyHtml | string | HTML description |
vendor | string | Vendor name |
productType | string | Product type |
status | string | Status (active, archived, draft) |
handle | string | URL handle |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
publishedAt | string | Published timestamp (ISO 8601) (optional) |
variants | ShopifyVariant[] | Product variants |
variants item fields (ShopifyVariant)
| Field | Type | Description |
|---|---|---|
id | string | Variant ID |
title | string | Variant title |
price | string | Price |
compareAtPrice | string | Compare-at price (optional) |
sku | string | SKU |
inventoryQuantity | number | Inventory quantity |
inventoryItemId | string | Inventory item ID (for inventory operations) (optional) |
option1 | string | Option 1 value (optional) |
option2 | string | Option 2 value (optional) |
option3 | string | Option 3 value (optional) |
barcode | string | Barcode (optional) |
taxable | boolean | Is taxable |
inventoryPolicy | string | Inventory policy: "continue" (keep selling when out of stock) or "deny" (stop selling when out of stock) (optional) |
| images | ShopifyImage[] | Product images |
images item fields (ShopifyImage)
| Field | Type | Description |
|---|---|---|
id | string | Image ID |
src | string | Image URL |
alt | string | Alt text (optional) |
width | number | Width in pixels |
height | number | Height in pixels |
position | number | Display position |
| templateSuffix | string | Template suffix for custom templates (optional) |
| publishedScope | string | Published scope (e.g., web) |
| options | object[] | Product options (e.g., Size, Color) with id, name, values[] |
Example:
createProduct
Create a new product in the Shopify store. At minimum, a title is required. Set status to "draft" to create without publishing.
Arguments:
title(string, required): The product title.bodyHtml(string, optional): HTML description of the product.vendor(string, optional): The product vendor.productType(string, optional): The product type for categorization.tags(string, optional): Comma-separated list of tags.status(string, optional): Product status: "active", "archived", or "draft". Defaults to "active".
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyProduct.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Product ID |
title | string | Product title |
bodyHtml | string | HTML description |
vendor | string | Vendor name |
productType | string | Product type |
status | string | Status (active, archived, draft) |
handle | string | URL handle |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
publishedAt | string | Published timestamp (ISO 8601) (optional) |
variants | ShopifyVariant[] | Product variants |
variants item fields (ShopifyVariant)
| Field | Type | Description |
|---|---|---|
id | string | Variant ID |
title | string | Variant title |
price | string | Price |
compareAtPrice | string | Compare-at price (optional) |
sku | string | SKU |
inventoryQuantity | number | Inventory quantity |
inventoryItemId | string | Inventory item ID (for inventory operations) (optional) |
option1 | string | Option 1 value (optional) |
option2 | string | Option 2 value (optional) |
option3 | string | Option 3 value (optional) |
barcode | string | Barcode (optional) |
taxable | boolean | Is taxable |
inventoryPolicy | string | Inventory policy: "continue" (keep selling when out of stock) or "deny" (stop selling when out of stock) (optional) |
| images | ShopifyImage[] | Product images |
images item fields (ShopifyImage)
| Field | Type | Description |
|---|---|---|
id | string | Image ID |
src | string | Image URL |
alt | string | Alt text (optional) |
width | number | Width in pixels |
height | number | Height in pixels |
position | number | Display position |
| templateSuffix | string | Template suffix for custom templates (optional) |
| publishedScope | string | Published scope (e.g., web) |
| options | object[] | Product options (e.g., Size, Color) with id, name, values[] |
Example:
updateProduct
Update an existing product. Only the fields you provide will be updated; omitted fields remain unchanged.
Arguments:
productId(string, required): The Shopify product ID to update.title(string, optional): New product title.bodyHtml(string, optional): New HTML description.vendor(string, optional): New vendor name.productType(string, optional): New product type.tags(string, optional): New comma-separated tags (replaces existing tags).status(string, optional): New status: "active", "archived", or "draft".
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyProduct.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Product ID |
title | string | Product title |
bodyHtml | string | HTML description |
vendor | string | Vendor name |
productType | string | Product type |
status | string | Status (active, archived, draft) |
handle | string | URL handle |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
publishedAt | string | Published timestamp (ISO 8601) (optional) |
variants | ShopifyVariant[] | Product variants |
variants item fields (ShopifyVariant)
| Field | Type | Description |
|---|---|---|
id | string | Variant ID |
title | string | Variant title |
price | string | Price |
compareAtPrice | string | Compare-at price (optional) |
sku | string | SKU |
inventoryQuantity | number | Inventory quantity |
inventoryItemId | string | Inventory item ID (for inventory operations) (optional) |
option1 | string | Option 1 value (optional) |
option2 | string | Option 2 value (optional) |
option3 | string | Option 3 value (optional) |
barcode | string | Barcode (optional) |
taxable | boolean | Is taxable |
inventoryPolicy | string | Inventory policy: "continue" (keep selling when out of stock) or "deny" (stop selling when out of stock) (optional) |
| images | ShopifyImage[] | Product images |
images item fields (ShopifyImage)
| Field | Type | Description |
|---|---|---|
id | string | Image ID |
src | string | Image URL |
alt | string | Alt text (optional) |
width | number | Width in pixels |
height | number | Height in pixels |
position | number | Display position |
| templateSuffix | string | Template suffix for custom templates (optional) |
| publishedScope | string | Published scope (e.g., web) |
| options | object[] | Product options (e.g., Size, Color) with id, name, values[] |
Example:
deleteProduct
Permanently delete a product from the Shopify store. This action cannot be undone.
Arguments:
productId(string, required): The Shopify product ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, productId } on success.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
productId | string | Deleted product ID |
Example:
listOrders
List orders from the Shopify store with optional filtering. Returns up to 50 orders per page sorted by creation date descending. By default returns open orders.
Arguments:
limit(number, optional): Number of orders to return per page (1-250). Defaults to 50.pageInfo(string, optional): Cursor for pagination from a previous response.status(string, optional): Filter by order status: "open", "closed", "cancelled", or "any". Defaults to "any".financialStatus(string, optional): Filter by financial status: "authorized", "pending", "paid", "partially_paid", "refunded", "voided", "partially_refunded", "any", "unpaid".fulfillmentStatus(string, optional): Filter by fulfillment status: "shipped", "partial", "unshipped", "any", "unfulfilled".sinceId(string, optional): Return orders after this order ID.createdAtMin(string, optional): Return orders created after this date (ISO 8601 format).createdAtMax(string, optional): Return orders created before this date (ISO 8601 format).
Returns:
AdapterOperationResult - Returns { orders: NormalizedShopifyOrder[], nextPageInfo, previousPageInfo, totalRetrieved }. Each order includes id, orderNumber, email, totalPrice, currency, financialStatus, fulfillmentStatus, lineItems, customer info.
Response Fields:
| Field | Type | Description |
|---|---|---|
orders | ShopifyNormalizedOrder[] | List of orders |
orders item fields (ShopifyNormalizedOrder)
| Field | Type | Description |
|---|---|---|
id | string | Order ID |
orderNumber | number | Human-readable order number |
name | string | Order name (e.g., #1001) |
email | string | Customer email |
totalPrice | string | Total price |
subtotalPrice | string | Subtotal price |
totalTax | string | Total tax |
totalDiscounts | string | Total discounts |
totalShipping | string | Total shipping charged to the customer (shipping revenue, not the merchant's carrier cost) |
currency | string | Currency code (e.g., USD) |
financialStatus | string | Financial status (paid, pending, etc.) |
fulfillmentStatus | string | Fulfillment status (optional) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
closedAt | string | Closed timestamp (optional) |
cancelledAt | string | Cancelled timestamp (optional) |
cancelReason | string | Cancellation reason (optional) |
note | string | Order note (optional) |
tags | string | Comma-separated tags |
customerFirstName | string | Customer first name |
customerLastName | string | Customer last name |
customerEmail | string | Customer email |
lineItems | ShopifyLineItem[] | Order line items |
totalLineItemsQuantity | number | Total quantity of all line items |
shippingAddressCity | string | Shipping city (optional) |
shippingAddressCountry | string | Shipping country (optional) |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of orders retrieved |
Example:
getOrder
Get a single order by its Shopify order ID. Returns full order details including line items and customer information.
Arguments:
orderId(string, required): The Shopify order ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyOrder with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Order ID |
orderNumber | number | Human-readable order number |
name | string | Order name (e.g., #1001) |
email | string | Customer email |
totalPrice | string | Total price |
subtotalPrice | string | Subtotal price |
totalTax | string | Total tax |
totalDiscounts | string | Total discounts |
totalShipping | string | Total shipping charged to the customer (shipping revenue, not the merchant's carrier cost) |
currency | string | Currency code (e.g., USD) |
financialStatus | string | Financial status (paid, pending, etc.) |
fulfillmentStatus | string | Fulfillment status (optional) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
closedAt | string | Closed timestamp (optional) |
cancelledAt | string | Cancelled timestamp (optional) |
cancelReason | string | Cancellation reason (optional) |
note | string | Order note (optional) |
tags | string | Comma-separated tags |
customerFirstName | string | Customer first name |
customerLastName | string | Customer last name |
customerEmail | string | Customer email |
lineItems | ShopifyLineItem[] | Order line items |
lineItems item fields (ShopifyLineItem)
| Field | Type | Description |
|---|---|---|
id | string | Line item ID |
title | string | Product title |
quantity | number | Quantity ordered |
price | string | Unit price |
sku | string | SKU |
variantTitle | string | Variant title (optional) |
vendor | string | Vendor (optional) |
productId | string | Product ID (optional) |
variantId | string | Variant ID (optional) |
fulfillmentStatus | string | Fulfillment status (optional) |
| totalLineItemsQuantity | number | Total quantity of all line items |
| shippingAddressCity | string | Shipping city (optional) |
| shippingAddressCountry | string | Shipping country (optional) |
Example:
getPaymentsBalance
Get the store's Shopify Payments balance and recent payouts (bank deposits). Useful for profit/cashflow tracking: the balance is funds not yet paid out, and each payout breaks down gross charges vs. processing fees. Requires the read_shopify_payments_payouts scope — if the store has not granted it, the merchant must reconnect Shopify and approve the expanded permissions. NOTE: this only works for stores that use Shopify Payments; stores on an external gateway (PayPal, Stripe, etc.) have no Shopify Payments account and the operation returns empty balance/payouts with an explanatory note.
Arguments:
limit(number, optional): Number of recent payouts to return, most recent first (1-50). Defaults to 10.
Returns:
AdapterOperationResult - Returns { balance: { amount, currency }[], payouts: NormalizedShopifyPayout[], totalRetrieved, note? }. balance may list multiple currencies. Each payout includes amount (net deposited), status, issuedAt, and gross/fee breakdown fields.
Response Fields:
| Field | Type | Description |
|---|---|---|
balance | ShopifyBalance[] | Per-currency balances not yet paid out |
balance item fields (ShopifyBalance)
| Field | Type | Description |
|---|---|---|
amount | string | Balance amount not yet paid out |
currency | string | Currency code (e.g., USD) |
| payouts | ShopifyPayout[] | Recent payouts, most recent first |
payouts item fields (ShopifyPayout)
| Field | Type | Description |
|---|---|---|
id | string | Payout ID |
status | string | Payout status (scheduled, in_transit, paid, failed, canceled) |
issuedAt | string | When the payout was issued (ISO 8601) |
amount | string | Net amount deposited to the bank account |
currency | string | Currency code (e.g., USD) |
chargesGross | string | Gross sales from charges included in this payout |
chargesFee | string | Processing fees on those charges |
refundsFee | string | Fees on refunds in this payout |
adjustmentsGross | string | Gross from adjustments (e.g. chargeback reversals) |
adjustmentsFee | string | Fees on adjustments |
| totalRetrieved | number | Number of payouts retrieved |
| note | string | Present only when the store does not use Shopify Payments (optional) |
Example:
createOrder
Create a new order in the Shopify store. Requires at least one line item. Can optionally include customer, shipping address, and financial details.
Arguments:
lineItems(array, required): Array of line items. Each item needs either variant_id or title+price+quantity. Example: [{ variant_id: "123", quantity: 2 }] or [{ title: "Custom Item", price: "10.00", quantity: 1 }].email(string, optional): Customer email address for the order.note(string, optional): An optional note attached to the order.tags(string, optional): Comma-separated tags for the order.financialStatus(string, optional): Financial status: "pending", "authorized", "partially_paid", "paid", "partially_refunded", "refunded", "voided". Defaults to "pending".shippingAddress(object, optional): Shipping address object with first_name, last_name, address1, address2, city, province, country, zip, phone.customerId(string, optional): Associate the order with an existing customer by their Shopify customer ID.
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyOrder.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Order ID |
orderNumber | number | Human-readable order number |
name | string | Order name (e.g., #1001) |
email | string | Customer email |
totalPrice | string | Total price |
subtotalPrice | string | Subtotal price |
totalTax | string | Total tax |
totalDiscounts | string | Total discounts |
totalShipping | string | Total shipping charged to the customer (shipping revenue, not the merchant's carrier cost) |
currency | string | Currency code (e.g., USD) |
financialStatus | string | Financial status (paid, pending, etc.) |
fulfillmentStatus | string | Fulfillment status (optional) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
closedAt | string | Closed timestamp (optional) |
cancelledAt | string | Cancelled timestamp (optional) |
cancelReason | string | Cancellation reason (optional) |
note | string | Order note (optional) |
tags | string | Comma-separated tags |
customerFirstName | string | Customer first name |
customerLastName | string | Customer last name |
customerEmail | string | Customer email |
lineItems | ShopifyLineItem[] | Order line items |
lineItems item fields (ShopifyLineItem)
| Field | Type | Description |
|---|---|---|
id | string | Line item ID |
title | string | Product title |
quantity | number | Quantity ordered |
price | string | Unit price |
sku | string | SKU |
variantTitle | string | Variant title (optional) |
vendor | string | Vendor (optional) |
productId | string | Product ID (optional) |
variantId | string | Variant ID (optional) |
fulfillmentStatus | string | Fulfillment status (optional) |
| totalLineItemsQuantity | number | Total quantity of all line items |
| shippingAddressCity | string | Shipping city (optional) |
| shippingAddressCountry | string | Shipping country (optional) |
Example:
cancelOrder
Cancel an existing order. The order must be open. Optionally specify a reason for cancellation.
Arguments:
orderId(string, required): The Shopify order ID to cancel.reason(string, optional): Cancellation reason: "customer", "fraud", "inventory", "declined", or "other".email(boolean, optional): Whether to send a cancellation email to the customer. Defaults to true.
Returns:
AdapterOperationResult - Returns the cancelled NormalizedShopifyOrder with updated cancelledAt and cancelReason fields.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Order ID |
orderNumber | number | Human-readable order number |
name | string | Order name (e.g., #1001) |
email | string | Customer email |
totalPrice | string | Total price |
subtotalPrice | string | Subtotal price |
totalTax | string | Total tax |
totalDiscounts | string | Total discounts |
totalShipping | string | Total shipping charged to the customer (shipping revenue, not the merchant's carrier cost) |
currency | string | Currency code (e.g., USD) |
financialStatus | string | Financial status (paid, pending, etc.) |
fulfillmentStatus | string | Fulfillment status (optional) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
closedAt | string | Closed timestamp (optional) |
cancelledAt | string | Cancelled timestamp (optional) |
cancelReason | string | Cancellation reason (optional) |
note | string | Order note (optional) |
tags | string | Comma-separated tags |
customerFirstName | string | Customer first name |
customerLastName | string | Customer last name |
customerEmail | string | Customer email |
lineItems | ShopifyLineItem[] | Order line items |
lineItems item fields (ShopifyLineItem)
| Field | Type | Description |
|---|---|---|
id | string | Line item ID |
title | string | Product title |
quantity | number | Quantity ordered |
price | string | Unit price |
sku | string | SKU |
variantTitle | string | Variant title (optional) |
vendor | string | Vendor (optional) |
productId | string | Product ID (optional) |
variantId | string | Variant ID (optional) |
fulfillmentStatus | string | Fulfillment status (optional) |
| totalLineItemsQuantity | number | Total quantity of all line items |
| shippingAddressCity | string | Shipping city (optional) |
| shippingAddressCountry | string | Shipping country (optional) |
Example:
closeOrder
Close an open order. A closed order is one that has no more work to be done (e.g., fully fulfilled and paid).
Arguments:
orderId(string, required): The Shopify order ID to close.
Returns:
AdapterOperationResult - Returns the closed NormalizedShopifyOrder with updated closedAt field.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Order ID |
orderNumber | number | Human-readable order number |
name | string | Order name (e.g., #1001) |
email | string | Customer email |
totalPrice | string | Total price |
subtotalPrice | string | Subtotal price |
totalTax | string | Total tax |
totalDiscounts | string | Total discounts |
totalShipping | string | Total shipping charged to the customer (shipping revenue, not the merchant's carrier cost) |
currency | string | Currency code (e.g., USD) |
financialStatus | string | Financial status (paid, pending, etc.) |
fulfillmentStatus | string | Fulfillment status (optional) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
closedAt | string | Closed timestamp (optional) |
cancelledAt | string | Cancelled timestamp (optional) |
cancelReason | string | Cancellation reason (optional) |
note | string | Order note (optional) |
tags | string | Comma-separated tags |
customerFirstName | string | Customer first name |
customerLastName | string | Customer last name |
customerEmail | string | Customer email |
lineItems | ShopifyLineItem[] | Order line items |
lineItems item fields (ShopifyLineItem)
| Field | Type | Description |
|---|---|---|
id | string | Line item ID |
title | string | Product title |
quantity | number | Quantity ordered |
price | string | Unit price |
sku | string | SKU |
variantTitle | string | Variant title (optional) |
vendor | string | Vendor (optional) |
productId | string | Product ID (optional) |
variantId | string | Variant ID (optional) |
fulfillmentStatus | string | Fulfillment status (optional) |
| totalLineItemsQuantity | number | Total quantity of all line items |
| shippingAddressCity | string | Shipping city (optional) |
| shippingAddressCountry | string | Shipping country (optional) |
Example:
listCustomers
List customers from the Shopify store with optional pagination. Returns up to 50 customers per page.
Arguments:
limit(number, optional): Number of customers to return per page (1-250). Defaults to 50.pageInfo(string, optional): Cursor for pagination from a previous response.sinceId(string, optional): Return customers after this customer ID.createdAtMin(string, optional): Return customers created after this date (ISO 8601 format).createdAtMax(string, optional): Return customers created before this date (ISO 8601 format).
Returns:
AdapterOperationResult - Returns { customers: NormalizedShopifyCustomer[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
customers | ShopifyNormalizedCustomer[] | List of customers |
customers item fields (ShopifyNormalizedCustomer)
| Field | Type | Description |
|---|---|---|
id | string | Customer ID |
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number (optional) |
ordersCount | number | Number of orders |
totalSpent | string | Total amount spent |
tags | string | Comma-separated tags |
state | string | Account state |
verifiedEmail | boolean | Whether email is verified |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
note | string | Customer note (optional) |
defaultAddressCity | string | Default address city (optional) |
defaultAddressCountry | string | Default address country (optional) |
taxExempt | boolean | Whether customer is tax exempt |
addresses | object[] | Customer addresses with id, firstName, lastName, address1, address2, city, province, country, zip, phone |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of customers retrieved |
Example:
getCustomer
Get a single customer by their Shopify customer ID. Returns full customer details including addresses.
Arguments:
customerId(string, required): The Shopify customer ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyCustomer with full details including addresses.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Customer ID |
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number (optional) |
ordersCount | number | Number of orders |
totalSpent | string | Total amount spent |
tags | string | Comma-separated tags |
state | string | Account state |
verifiedEmail | boolean | Whether email is verified |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
note | string | Customer note (optional) |
defaultAddressCity | string | Default address city (optional) |
defaultAddressCountry | string | Default address country (optional) |
taxExempt | boolean | Whether customer is tax exempt |
addresses | object[] | Customer addresses with id, firstName, lastName, address1, address2, city, province, country, zip, phone |
Example:
createCustomer
Create a new customer in the Shopify store. At minimum, either an email or a phone number is required.
Arguments:
firstName(string, optional): Customer first name.lastName(string, optional): Customer last name.email(string, optional): Customer email address. Required if phone is not provided.phone(string, optional): Customer phone number in E.164 format. Required if email is not provided.tags(string, optional): Comma-separated tags for the customer.note(string, optional): A note about the customer.addresses(array, optional): Array of address objects with address1, city, province, country, zip, phone.
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyCustomer.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Customer ID |
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number (optional) |
ordersCount | number | Number of orders |
totalSpent | string | Total amount spent |
tags | string | Comma-separated tags |
state | string | Account state |
verifiedEmail | boolean | Whether email is verified |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
note | string | Customer note (optional) |
defaultAddressCity | string | Default address city (optional) |
defaultAddressCountry | string | Default address country (optional) |
taxExempt | boolean | Whether customer is tax exempt |
addresses | object[] | Customer addresses with id, firstName, lastName, address1, address2, city, province, country, zip, phone |
Example:
updateCustomer
Update an existing customer. Only the fields you provide will be updated.
Arguments:
customerId(string, required): The Shopify customer ID to update.firstName(string, optional): New first name.lastName(string, optional): New last name.email(string, optional): New email address.phone(string, optional): New phone number in E.164 format.tags(string, optional): New comma-separated tags (replaces existing).note(string, optional): New note about the customer.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyCustomer.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Customer ID |
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number (optional) |
ordersCount | number | Number of orders |
totalSpent | string | Total amount spent |
tags | string | Comma-separated tags |
state | string | Account state |
verifiedEmail | boolean | Whether email is verified |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
note | string | Customer note (optional) |
defaultAddressCity | string | Default address city (optional) |
defaultAddressCountry | string | Default address country (optional) |
taxExempt | boolean | Whether customer is tax exempt |
addresses | object[] | Customer addresses with id, firstName, lastName, address1, address2, city, province, country, zip, phone |
Example:
searchCustomers
Search customers by a query string. Searches across email, name, and other fields. Returns up to 50 results.
Arguments:
query(string, required): Search query string. Examples: "email:john@example.com", "first_name:John", or freeform text like "john doe".limit(number, optional): Number of results to return (1-250). Defaults to 50.
Returns:
AdapterOperationResult - Returns { customers: NormalizedShopifyCustomer[], totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
customers | ShopifyNormalizedCustomer[] | Search results |
customers item fields (ShopifyNormalizedCustomer)
| Field | Type | Description |
|---|---|---|
id | string | Customer ID |
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number (optional) |
ordersCount | number | Number of orders |
totalSpent | string | Total amount spent |
tags | string | Comma-separated tags |
state | string | Account state |
verifiedEmail | boolean | Whether email is verified |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
note | string | Customer note (optional) |
defaultAddressCity | string | Default address city (optional) |
defaultAddressCountry | string | Default address country (optional) |
taxExempt | boolean | Whether customer is tax exempt |
addresses | object[] | Customer addresses with id, firstName, lastName, address1, address2, city, province, country, zip, phone |
| totalRetrieved | number | Number of customers found |
Example:
getInventoryLevels
Get inventory levels. With no arguments, returns levels for all inventory items (up to limit). Optionally narrow by inventoryItemIds and/or filter by locationIds. Each returned level includes the locationId needed for adjustInventory.
Arguments:
inventoryItemIds(string, optional): Comma-separated list of inventory item IDs to query. Omit to return levels for all items.locationIds(string, optional): Comma-separated list of location IDs to filter results to. Omit to return levels at all locations.limit(number, optional): Number of results to return (1-250). Defaults to 50.
Returns:
AdapterOperationResult - Returns { inventoryLevels: NormalizedShopifyInventoryLevel[], totalRetrieved }. Each level includes inventoryItemId, locationId, available quantity, and updatedAt.
Response Fields:
| Field | Type | Description |
|---|---|---|
inventoryLevels | ShopifyNormalizedInventoryLevel[] | Inventory levels |
inventoryLevels item fields (ShopifyNormalizedInventoryLevel)
| Field | Type | Description |
|---|---|---|
inventoryItemId | string | Inventory item ID |
locationId | string | Location ID |
available | number | Available quantity (optional) |
updatedAt | string | Last update timestamp |
| totalRetrieved | number | Number of levels retrieved |
Example:
adjustInventory
Adjust the available inventory quantity for an item at a specific location. The adjustment is relative (e.g., +5 adds 5 units, -3 removes 3 units).
Arguments:
inventoryItemId(string, required): The inventory item ID to adjust.locationId(string, required): The location ID where the inventory is stored.adjustment(number, required): The quantity adjustment. Positive to add stock, negative to remove.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyInventoryLevel with the new available quantity.
Response Fields:
| Field | Type | Description |
|---|---|---|
inventoryItemId | string | Inventory item ID |
locationId | string | Location ID |
available | number | Available quantity (optional) |
updatedAt | string | Last update timestamp |
Example:
listCollections
List collections in the Shopify store. Returns both custom collections and smart collections combined, sorted by title.
Arguments:
limit(number, optional): Maximum number of collections to return per type (1-250). Defaults to 50. Note: up to this many custom collections AND this many smart collections may be returned.pageInfo(string, optional): Cursor for pagination from a previous response.
Returns:
AdapterOperationResult - Returns { collections: NormalizedShopifyCollection[], totalRetrieved }. Each collection includes id, title, bodyHtml, handle, sortOrder, collectionType ("custom" or "smart"), imageUrl.
Response Fields:
| Field | Type | Description |
|---|---|---|
collections | ShopifyNormalizedCollection[] | List of collections |
collections item fields (ShopifyNormalizedCollection)
| Field | Type | Description |
|---|---|---|
id | string | Collection ID |
title | string | Collection title |
bodyHtml | string | HTML description |
handle | string | URL handle |
sortOrder | string | Sort order |
publishedAt | string | Published timestamp (optional) |
updatedAt | string | Last update timestamp |
collectionType | string | Type: "custom" or "smart" |
imageUrl | string | Collection image URL (optional) |
imageAlt | string | Image alt text (optional) |
productsCount | number | Number of products in collection (optional) |
| totalRetrieved | number | Number of collections retrieved |
Example:
listPages
List pages in the Shopify store with optional pagination.
Arguments:
limit(number, optional): Number of pages per page, 1-250, default 50pageInfo(string, optional): Cursor for pagination
Returns:
AdapterOperationResult - Returns { pages: NormalizedShopifyPage[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
pages | ShopifyNormalizedPage[] | List of pages |
pages item fields (ShopifyNormalizedPage)
| Field | Type | Description |
|---|---|---|
id | string | Page ID |
title | string | Page title |
handle | string | URL handle |
bodyHtml | string | HTML content |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
templateSuffix | string | Template suffix (optional) |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of pages retrieved |
Example:
getPage
Get a single page by ID.
Arguments:
pageId(string, required): The Shopify page ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyPage with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Page ID |
title | string | Page title |
handle | string | URL handle |
bodyHtml | string | HTML content |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
templateSuffix | string | Template suffix (optional) |
Example:
createPage
Create a new page in the Shopify store.
Arguments:
title(string, required): The page title.bodyHtml(string, optional): HTML body content of the page.author(string, optional): The author of the page.templateSuffix(string, optional): The template suffix for the page.published(boolean, optional): Whether the page is published. Defaults to true.
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyPage.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Page ID |
title | string | Page title |
handle | string | URL handle |
bodyHtml | string | HTML content |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
templateSuffix | string | Template suffix (optional) |
Example:
updatePage
Update a page.
Arguments:
pageId(string, required): The Shopify page ID to update.title(string, optional): New page title.bodyHtml(string, optional): New HTML body content.author(string, optional): New author name.templateSuffix(string, optional): New template suffix.published(boolean, optional): Whether the page is published.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyPage.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Page ID |
title | string | Page title |
handle | string | URL handle |
bodyHtml | string | HTML content |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
templateSuffix | string | Template suffix (optional) |
Example:
deletePage
Permanently delete a page.
Arguments:
pageId(string, required): The Shopify page ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, pageId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
pageId | string | Deleted page ID |
Example:
listBlogs
List blogs in the Shopify store.
Arguments:
limit(number, optional): Number of blogs per page, 1-250, default 50pageInfo(string, optional): Cursor for pagination
Returns:
AdapterOperationResult - Returns { blogs: NormalizedShopifyBlog[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
blogs | ShopifyNormalizedBlog[] | List of blogs |
blogs item fields (ShopifyNormalizedBlog)
| Field | Type | Description |
|---|---|---|
id | string | Blog ID |
title | string | Blog title |
handle | string | URL handle |
commentable | string | Comment policy |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
tags | string | Comma-separated tags |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of blogs retrieved |
Example:
getBlog
Get a blog by ID.
Arguments:
blogId(string, required): The Shopify blog ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyBlog with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Blog ID |
title | string | Blog title |
handle | string | URL handle |
commentable | string | Comment policy |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
tags | string | Comma-separated tags |
Example:
createBlog
Create a blog.
Arguments:
title(string, required): The blog title.commentable(string, optional): Comment policy: no, moderate, yes
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyBlog.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Blog ID |
title | string | Blog title |
handle | string | URL handle |
commentable | string | Comment policy |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
tags | string | Comma-separated tags |
Example:
updateBlog
Update a blog.
Arguments:
blogId(string, required): The Shopify blog ID to update.title(string, optional): New blog title.commentable(string, optional): New comment policy: no, moderate, yes
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyBlog.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Blog ID |
title | string | Blog title |
handle | string | URL handle |
commentable | string | Comment policy |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
tags | string | Comma-separated tags |
Example:
deleteBlog
Delete a blog.
Arguments:
blogId(string, required): The Shopify blog ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, blogId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
blogId | string | Deleted blog ID |
Example:
listArticles
List articles in a blog.
Arguments:
blogId(string, required): The blog ID to list articles from.limit(number, optional): Number of articles per page, 1-250, default 50pageInfo(string, optional): Cursor for pagination
Returns:
AdapterOperationResult - Returns { articles: NormalizedShopifyArticle[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
articles | ShopifyNormalizedArticle[] | List of articles |
articles item fields (ShopifyNormalizedArticle)
| Field | Type | Description |
|---|---|---|
id | string | Article ID |
blogId | string | Parent blog ID |
title | string | Article title |
author | string | Author name |
handle | string | URL handle |
bodyHtml | string | HTML content |
summary | string | Article summary |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
imageUrl | string | Image URL (optional) |
imageAlt | string | Image alt text (optional) |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of articles retrieved |
Example:
getArticle
Get an article by ID.
Arguments:
articleId(string, required): The Shopify article ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyArticle with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Article ID |
blogId | string | Parent blog ID |
title | string | Article title |
author | string | Author name |
handle | string | URL handle |
bodyHtml | string | HTML content |
summary | string | Article summary |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
imageUrl | string | Image URL (optional) |
imageAlt | string | Image alt text (optional) |
Example:
createArticle
Create an article in a blog.
Arguments:
blogId(string, required): The blog ID to create the article in.title(string, required): The article title.author(string, optional): The article author.bodyHtml(string, optional): HTML body content of the article.summary(string, optional): Summary or excerpt of the article.tags(string, optional): Comma-separated list of tags.published(boolean, optional): Whether the article is published.imageUrl(string, optional): URL of the article featured image.imageAlt(string, optional): Alt text for the article featured image.
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyArticle.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Article ID |
blogId | string | Parent blog ID |
title | string | Article title |
author | string | Author name |
handle | string | URL handle |
bodyHtml | string | HTML content |
summary | string | Article summary |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
imageUrl | string | Image URL (optional) |
imageAlt | string | Image alt text (optional) |
Example:
updateArticle
Update an article.
Arguments:
articleId(string, required): The Shopify article ID to update.title(string, optional): New article title.author(string, optional): New author name.bodyHtml(string, optional): New HTML body content.summary(string, optional): New summary or excerpt.tags(string, optional): New comma-separated tags.published(boolean, optional): Whether the article is published.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyArticle.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Article ID |
blogId | string | Parent blog ID |
title | string | Article title |
author | string | Author name |
handle | string | URL handle |
bodyHtml | string | HTML content |
summary | string | Article summary |
tags | string | Comma-separated tags |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
publishedAt | string | Published timestamp (optional) |
imageUrl | string | Image URL (optional) |
imageAlt | string | Image alt text (optional) |
Example:
deleteArticle
Delete an article.
Arguments:
articleId(string, required): The Shopify article ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, articleId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
articleId | string | Deleted article ID |
Example:
listThemes
List all themes in the Shopify store.
Returns:
AdapterOperationResult - Returns { themes: NormalizedShopifyTheme[], totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
themes | ShopifyNormalizedTheme[] | List of themes |
themes item fields (ShopifyNormalizedTheme)
| Field | Type | Description |
|---|---|---|
id | string | Theme ID |
name | string | Theme name |
role | string | Theme role (main, unpublished, demo) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
processing | boolean | Whether theme is being processed |
| totalRetrieved | number | Number of themes retrieved |
Example:
getTheme
Get a theme by ID.
Arguments:
themeId(string, required): The Shopify theme ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyTheme with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Theme ID |
name | string | Theme name |
role | string | Theme role (main, unpublished, demo) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
processing | boolean | Whether theme is being processed |
Example:
publishTheme
Publish (activate) a theme as the main theme.
Arguments:
themeId(string, required): The Shopify theme ID to publish.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyTheme with role set to main.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Theme ID |
name | string | Theme name |
role | string | Theme role (main, unpublished, demo) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
processing | boolean | Whether theme is being processed |
Example:
listThemeFiles
List files in a theme.
Arguments:
themeId(string, required): The Shopify theme ID.filenames(string, optional): Comma-separated glob patterns like templates/*.json
Returns:
AdapterOperationResult - Returns { files: NormalizedShopifyThemeFile[], totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
files | ShopifyNormalizedThemeFile[] | List of theme files |
files item fields (ShopifyNormalizedThemeFile)
| Field | Type | Description |
|---|---|---|
filename | string | File path |
contentType | string | MIME type |
size | number | File size in bytes |
checksumMd5 | string | MD5 checksum (optional) |
body | string | File content (optional) |
| totalRetrieved | number | Number of files retrieved |
Example:
getThemeFile
Get a single theme file with its content.
Arguments:
themeId(string, required): The Shopify theme ID.filename(string, required): The filename/path of the theme file (e.g., "templates/index.json").
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyThemeFile with filename, body content, and metadata.
Response Fields:
| Field | Type | Description |
|---|---|---|
filename | string | File path |
contentType | string | MIME type |
size | number | File size in bytes |
checksumMd5 | string | MD5 checksum (optional) |
body | string | File content (optional) |
Example:
upsertThemeFiles
Create or update theme files.
Arguments:
themeId(string, required): The Shopify theme ID.files(array, required): Array of {filename, body} objects
Returns:
AdapterOperationResult - Returns { files: NormalizedShopifyThemeFile[], totalRetrieved } with the created or updated files.
Response Fields:
| Field | Type | Description |
|---|---|---|
upsertedFiles | string[] | List of upserted file paths |
totalUpserted | number | Number of files upserted |
Example:
deleteThemeFiles
Delete theme files.
Arguments:
themeId(string, required): The Shopify theme ID.filenames(array, required): Array of filenames to delete
Returns:
AdapterOperationResult - Returns { deleted: true, filenames } with the list of deleted files.
Response Fields:
| Field | Type | Description |
|---|---|---|
deletedFiles | string[] | List of deleted file paths |
totalDeleted | number | Number of files deleted |
Example:
listMenus
List navigation menus.
Arguments:
limit(number, optional): Number of menus per page, 1-250, default 50pageInfo(string, optional): Cursor for pagination
Returns:
AdapterOperationResult - Returns { menus: NormalizedShopifyMenu[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
menus | ShopifyNormalizedMenu[] | List of menus |
menus item fields (ShopifyNormalizedMenu)
| Field | Type | Description |
|---|---|---|
id | string | Menu ID |
title | string | Menu title |
handle | string | URL handle |
items | object[] | Menu items, each with id, title, type, url, resourceId, and nested items[] |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of menus retrieved |
Example:
getMenu
Get a menu by ID.
Arguments:
menuId(string, required): The Shopify menu ID.
Returns:
AdapterOperationResult - Returns a single NormalizedShopifyMenu with full details.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Menu ID |
title | string | Menu title |
handle | string | URL handle |
items | object[] | Menu items, each with id, title, type, url, resourceId, and nested items[] |
Example:
createMenu
Create a navigation menu.
Arguments:
title(string, required): The menu title.handle(string, optional): The menu handle (URL-friendly identifier).items(array, optional): Array of menu item objects with title, url, type, resourceId
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyMenu.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Menu ID |
title | string | Menu title |
handle | string | URL handle |
items | object[] | Menu items, each with id, title, type, url, resourceId, and nested items[] |
Example:
updateMenu
Update a menu.
Arguments:
menuId(string, required): The Shopify menu ID to update.title(string, optional): New menu title.handle(string, optional): New menu handle.items(array, optional): New array of menu item objects with title, url, type, resourceId
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyMenu.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Menu ID |
title | string | Menu title |
handle | string | URL handle |
items | object[] | Menu items, each with id, title, type, url, resourceId, and nested items[] |
Example:
deleteMenu
Delete a menu.
Arguments:
menuId(string, required): The Shopify menu ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, menuId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
menuId | string | Deleted menu ID |
Example:
listRedirects
List URL redirects.
Arguments:
limit(number, optional): Number of redirects per page, 1-250, default 50pageInfo(string, optional): Cursor for pagination
Returns:
AdapterOperationResult - Returns { redirects: NormalizedShopifyRedirect[], nextPageInfo, previousPageInfo, totalRetrieved }.
Response Fields:
| Field | Type | Description |
|---|---|---|
redirects | ShopifyNormalizedRedirect[] | List of redirects |
redirects item fields (ShopifyNormalizedRedirect)
| Field | Type | Description |
|---|---|---|
id | string | Redirect ID |
path | string | Source path |
target | string | Target URL |
| nextPageInfo | string | Cursor for next page (optional) |
| previousPageInfo | string | Cursor for previous page (optional) |
| totalRetrieved | number | Number of redirects retrieved |
Example:
createRedirect
Create a URL redirect.
Arguments:
path(string, required): The old path to redirect fromtarget(string, required): The new URL to redirect to
Returns:
AdapterOperationResult - Returns the created NormalizedShopifyRedirect.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Redirect ID |
path | string | Source path |
target | string | Target URL |
Example:
updateRedirect
Update a redirect.
Arguments:
redirectId(string, required): The Shopify redirect ID to update.path(string, optional): New path to redirect from.target(string, optional): New URL to redirect to.
Returns:
AdapterOperationResult - Returns the updated NormalizedShopifyRedirect.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Redirect ID |
path | string | Source path |
target | string | Target URL |
Example:
deleteRedirect
Delete a redirect.
Arguments:
redirectId(string, required): The Shopify redirect ID to delete.
Returns:
AdapterOperationResult - Returns { deleted: true, redirectId }.
Response Fields:
| Field | Type | Description |
|---|---|---|
deleted | boolean | Whether deletion was successful |
redirectId | string | Deleted redirect ID |
Example:
createCoupon
Create a discount code (coupon) that customers can enter at checkout for a percentage or fixed-amount discount off their entire order. The coupon is active immediately unless startsAt is provided.
Arguments:
code(string, required): The coupon code customers type at checkout, e.g. "SUMMER20". Case-insensitive at checkout.valueType(string, required): The discount type: "percentage" for a percent off, or "fixed_amount" for a flat currency amount off.value(number, required): The discount amount. For valueType "percentage", a percent from 1-100 (e.g. 20 = 20% off). For valueType "fixed_amount", the currency amount off the order (e.g. 10 = $10 off in the store currency).title(string, optional): Admin-facing title for the discount shown in the Shopify dashboard. Defaults to the code if omitted.startsAt(string, optional): When the coupon becomes active (ISO 8601). Defaults to now.endsAt(string, optional): When the coupon expires (ISO 8601). Omit for no expiry. Must be after startsAt.usageLimit(number, optional): Maximum total number of times this coupon can be used across all customers. Omit for unlimited.appliesOncePerCustomer(boolean, optional): If true, each customer can use the coupon only once. Defaults to false.minimumSubtotal(number, optional): Minimum order subtotal (in the store currency) required to use the coupon. Omit for no minimum.
Returns:
AdapterOperationResult - Returns the created discount code: { id, code, title, status, valueType, value, startsAt, endsAt, usageLimit, appliesOncePerCustomer, minimumSubtotal }.
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Discount code node ID |
code | string | The coupon code customers enter at checkout |
title | string | Admin-facing discount title |
status | string | Discount status (active, scheduled, expired) |
valueType | string | Discount type (percentage or fixed_amount) |
value | string | Discount value — the percent for percentage coupons, or currency amount for fixed_amount coupons |
startsAt | string | Activation timestamp (ISO 8601) (optional) |
endsAt | string | Expiry timestamp (ISO 8601) (optional) |
usageLimit | number | Maximum total redemptions, or null for unlimited (optional) |
appliesOncePerCustomer | boolean | Whether each customer can use it only once |
minimumSubtotal | string | Minimum order subtotal required, or null for none (optional) |
Example: