Admin API

GraphQL Admin API reference

Generated from the live schema. Root types:

Queries

shopShop!

The current store.

product
  • id: ID!
Product

Get a product by ID. Requires read_products.

productsProductConnection!

List products, newest first. query matches title, vendor, type, tag or SKU. Requires read_products.

collections
  • first: Int = 20
  • after: String
CollectionConnection!

List collections. Requires read_products.

order
  • id: ID!
Order

Get an order by ID. Requires read_orders.

orders
  • first: Int = 20
  • after: String
  • query: String
OrderConnection!

List orders, newest first. query matches order number, email or customer name. Requires read_orders.

customers
  • first: Int = 20
  • after: String
  • query: String
CustomerConnection!

List customers. Requires read_customers.

locations[Location!]!

Stock locations. Requires read_inventory.

webhookSubscriptions[WebhookSubscription!]!

This app's webhook subscriptions.

themes[Theme!]!

The store's themes, live theme first. Requires read_themes.

theme
  • id: ID!
Theme

Get a theme by ID. Requires read_themes.

discountCodes
  • first: Int = 20
  • after: String
  • query: String
DiscountCodeConnection!

Discount codes, newest first. query matches the code or title. Requires read_discounts.

Mutations

productCreateProductPayload!

Create a product with options, variants and images. Requires write_products.

productUpdateProductPayload!

Update product-level fields. Requires write_products.

productVariantUpdate
  • id: ID!
  • price: String
  • compareAtPrice: String
  • sku: String
ProductVariantPayload!

Update a variant's price, compare-at price or SKU. Requires write_products.

productDelete
  • id: ID!
DeletePayload!

Delete a product. Requires write_products.

inventorySetOnHand
  • variantId: ID!
  • locationId: ID
  • quantity: Int!
  • reason: String
InventoryPayload!

Set the on-hand quantity of a variant at a location (default location if omitted). Requires write_inventory.

orderMarkAsPaid
  • id: ID!
OrderPayload!

Record the outstanding balance as paid (e.g. COD collected). Requires write_orders.

fulfillmentCreateOrderPayload!

Fulfill line items (all remaining items if lineItems is omitted). Requires write_orders.

webhookSubscriptionCreateWebhookSubscriptionPayload!

Subscribe this app to a webhook topic. Requires the topic's read scope.

webhookSubscriptionDelete
  • id: ID!
DeletePayload!

Remove one of this app's webhook subscriptions.

themeCreate
  • name: String!
ThemePayload!

Add an unpublished theme with the starter files. Requires write_themes.

themeFilesUpsertThemeFilesUpsertPayload!

Create or replace up to 50 files (5 MB in total) in a theme. Each file is validated like in the code editor. Requires write_themes.

themeFilesDelete
  • themeId: ID!
  • paths: [String!]!
ThemeFilesDeletePayload!

Delete files from a theme. Required files (layout/theme.liquid, config/settings_*.json, assets/custom.*) are kept. Requires write_themes.

themePublish
  • id: ID!
ThemePayload!

Make a theme the live theme. Requires write_themes.

themeDelete
  • id: ID!
DeletePayload!

Delete an unpublished theme. Requires write_themes.

discountCodeCreateDiscountCodePayload!

Create a discount code (all products, all customers). Requires write_discounts.

discountCodeDelete
  • id: ID!
DeletePayload!

Delete a discount code. Requires write_discounts.

Types

49 types · 21 returned directly by root fields

Collection object

A group of products. Requires read_products.

idID!
titleString!
handleString!
collectionTypeString!

MANUAL or SMART

descriptionHtmlString!
imageImage
productsCountInt!

CollectionConnection object

Customer object

A customer. Requires read_customers.

idID!
emailString

Requires read_customer_pii (null without it).

firstNameString
lastNameString
phoneString
acceptsMarketingBoolean!
ordersCountInt!
amountSpentMoneyV2!
tags[String!]!
noteString
defaultAddressMailingAddress
createdAtString!

CustomerConnection object

DeletePayload object

deletedIdID
userErrors[UserError!]!

DiscountCode object

A discount code customers enter at checkout. Requires read_discounts.

idID!
codeString!
titleString!
typeString!

PERCENTAGE, FIXED_AMOUNT, FREE_SHIPPING or BUY_X_GET_Y

valueString!

Percent off ('15') for PERCENTAGE, an amount ('200.00') for FIXED_AMOUNT, '0' otherwise.

minimumSubtotalString

Minimum cart subtotal ('999.00'), or null.

usageCountInt!
usageLimitInt
oncePerCustomerBoolean!
startsAtString!
endsAtString
activeBoolean!

Enabled and within its dates and usage limit.

createdAtString!

DiscountCodeConnection object

DiscountCodeInput input

codeString!

3–50 letters, numbers, dashes or underscores (saved uppercase).

titleString

Shown in the admin; defaults to the code.

typeString

PERCENTAGE (default), FIXED_AMOUNT or FREE_SHIPPING

valueString

Percent (1–100) for PERCENTAGE, amount ('200.00') for FIXED_AMOUNT; ignored for FREE_SHIPPING.

minimumSubtotalString

Only for carts with this subtotal or more ('999.00').

usageLimitInt
oncePerCustomerBoolean
startsAtString

ISO date-time; defaults to now.

endsAtString

DiscountCodePayload object

discountCodeDiscountCode
userErrors[UserError!]!

FulfillmentLineItemInput input

idID!
quantityInt!

Image object

urlString!
altTextString

ImageInput input

urlString!
altTextString

InventoryPayload object

availableInt

Available quantity after the change.

userErrors[UserError!]!

InventoryPolicy enum

  • DENY
  • CONTINUE

LineItem object

idID!
titleString!
variantTitleString
skuString
quantityInt!
fulfilledQuantityInt!
refundedQuantityInt!
originalUnitPriceMoneyV2!
totalDiscountMoneyV2!
productIdID
variantIdID
imageUrlString

Location object

A stock location. Requires read_inventory.

idID!
nameString!
isDefaultBoolean!
isActiveBoolean!

MailingAddress object

firstNameString
lastNameString
companyString
address1String
address2String
cityString
stateString

ISO 3166-2:IN state code, e.g. KA.

stateNameString
pincodeString
countryString
phoneString

MoneyV2 object

A monetary value with currency (amount is a decimal string, e.g. "799.00").

amountString!
currencyCodeString!

Order object

An order. Requires read_orders.

idID!
nameString!

e.g. #1001

numberInt!
emailString

Requires read_customer_pii (null without it).

phoneString
createdAtString!
updatedAtString!
cancelledAtString
cancelReasonString
closedBoolean!
displayFinancialStatusString!

PENDING, PAID, PARTIALLY_REFUNDED, REFUNDED or VOIDED

displayFulfillmentStatusString!

UNFULFILLED, PARTIALLY_FULFILLED or FULFILLED

paymentGatewayString!

razorpay, cod or manual

sourceNameString!
currencyCodeString!
subtotalPriceMoneyV2!
totalDiscountsMoneyV2!
totalShippingMoneyV2!
totalTaxMoneyV2!
taxesIncludedBoolean!
totalPriceMoneyV2!
totalReceivedMoneyV2!
totalRefundedMoneyV2!
discountCodes[String!]!
taxLines[TaxLine!]!
noteString
tags[String!]!
customerIdID
shippingAddressMailingAddress
shippingLineShippingLine
lineItems[LineItem!]!
statusPageUrlString!

Customer-facing order status page.

OrderConnection object

nodes[Order!]!
pageInfoPageInfo!

OrderPayload object

orderOrder
userErrors[UserError!]!

PageInfo object

Information about pagination in a connection.

hasNextPageBoolean!
endCursorString

Product object

A product. Requires read_products.

idID!
titleString!
handleString!
statusProductStatus!
descriptionHtmlString!
vendorString!
productTypeString!
tags[String!]!
seoSEO!
options[ProductOption!]!
images[Image!]!
variants[ProductVariant!]!
totalInventoryInt!
onlineStoreUrlString
createdAtString!
updatedAtString!

ProductConnection object

ProductInput input

titleString
descriptionHtmlString
vendorString
productTypeString
tags[String!]
statusProductStatus
handleString
seoTitleString
seoDescriptionString

ProductOption object

nameString!
values[String!]!

ProductOptionInput input

nameString!
values[String!]!

ProductPayload object

productProduct
userErrors[UserError!]!

ProductStatus enum

  • ACTIVE
  • DRAFT
  • ARCHIVED

ProductVariant object

A product variant (a purchasable combination of option values).

idID!
titleString!
skuString
barcodeString
priceMoneyV2!
compareAtPriceMoneyV2
inventoryQuantityInt!

Available quantity across locations (on hand − committed). Requires read_inventory to be meaningful.

inventoryTrackedBoolean!
inventoryPolicyInventoryPolicy!
taxableBoolean!
requiresShippingBoolean!
weightGramsInt!
selectedOptions[SelectedOption!]!

ProductVariantInput input

priceString!

Decimal string, e.g. "799.00".

compareAtPriceString
skuString
barcodeString
options[String!]

Option values in the same order as the product options.

inventoryQuantityInt

Initial available quantity at the default location.

inventoryPolicyInventoryPolicy
weightGramsInt
taxableBoolean
requiresShippingBoolean

ProductVariantPayload object

productVariantProductVariant
userErrors[UserError!]!

SelectedOption object

nameString!
valueString!

SEO object

titleString
descriptionString

ShippingLine object

titleString!
priceMoneyV2!

Shop object

The store the access token belongs to.

idID!
nameString!
emailString!
myshopifyDomainString!

The storefront host, e.g. demo.sellify.in.

urlString!
currencyCodeString!
timezoneString!
publishedBoolean!

Whether the online store is published (not password protected).

TaxLine object

titleString!
rateFloat!
priceMoneyV2!

Theme object

idID!
nameString!
roleThemeRole!
previewUrlString!

The storefront showing this theme. For unpublished themes it is a signed preview link, valid for 4 hours.

editorUrlString!

The theme's code editor in the Sellify admin.

updatedAtString!
files
  • paths: [String!]
[ThemeFile!]!

The theme's files, or only the given paths.

ThemeFile object

A file in a theme (layout, templates, sections, snippets, assets, config, locales). All theme files are text.

pathString!

e.g. sections/hero.liquid

sizeInt!

Size in bytes (UTF-8).

checksumString!

MD5 of the content, hex. Compare with a local file to skip unchanged uploads.

contentString!
updatedAtString!

ThemeFileInput input

pathString!
contentString!

ThemeFilesDeletePayload object

deletedPaths[String!]!
userErrors[UserError!]!

ThemeFilesUpsertPayload object

upsertedPaths[String!]!

Paths that were saved. Files with errors are skipped; the rest are still saved.

userErrors[UserError!]!

ThemePayload object

themeTheme
userErrors[UserError!]!

ThemeRole enum

  • MAIN
  • UNPUBLISHED

TrackingInput input

companyString
numberString
urlString

UserError object

A user-facing validation error returned by a mutation.

field[String!]

Path to the input field that caused the error.

messageString!

WebhookSubscription object

idID!
topicWebhookTopic!
callbackUrlString!
createdAtString!

WebhookSubscriptionPayload object

webhookSubscriptionWebhookSubscription
userErrors[UserError!]!

WebhookTopic enum

  • ORDERS_CREATE
  • ORDERS_PAID
  • ORDERS_FULFILLED
  • ORDERS_CANCELLED
  • REFUNDS_CREATE
  • PRODUCTS_CREATE
  • PRODUCTS_UPDATE
  • PRODUCTS_DELETE