# Pulssor Apps Admin GraphQL — Admin API 1 / 2027-01 # # Source of truth for the public third-party Apps Admin API. # Status: Proposed until runtime + contract tests + docs agree (see STATUS.md). # # HTTP: POST /api/graphql # Auth: Authorization: Bearer # Version: X-Pulssor-API-Version: 2027-01 """ISO-8601 timestamp.""" scalar DateTime """Decimal money / numeric string (never floating point in clients).""" scalar Decimal """Absolute HTTPS URL.""" scalar URL """Opaque globally unique ID. Format: gid://pulssor/{Type}/{id}""" scalar ID enum CurrencyCode { USD EUR GBP PKR INR CAD AUD OTHER } enum ProductStatus { ACTIVE DRAFT ARCHIVED } enum OrderStatus { OPEN CANCELLED CLOSED } enum FinancialStatus { PENDING AUTHORIZED PAID PARTIALLY_PAID REFUNDED PARTIALLY_REFUNDED VOIDED } enum FulfillmentStatus { UNFULFILLED PARTIAL FULFILLED RESTOCKED } enum DiscountStatus { ACTIVE EXPIRED SCHEDULED DISABLED } enum AppInstallationStatus { ACTIVE UNINSTALLED SUSPENDED } enum ProductSortKey { ID CREATED_AT UPDATED_AT TITLE } enum WebhookTopic { APP_UNINSTALLED PRODUCT_CREATED PRODUCT_UPDATED PRODUCT_DELETED COLLECTION_CREATED COLLECTION_UPDATED COLLECTION_DELETED CUSTOMER_CREATED CUSTOMER_UPDATED ORDER_CREATED ORDER_UPDATED ORDER_PAID ORDER_CANCELLED INVENTORY_UPDATED DISCOUNT_CREATED DISCOUNT_UPDATED DISCOUNT_DELETED PAGE_CREATED PAGE_UPDATED PAGE_DELETED ARTICLE_CREATED ARTICLE_UPDATED ARTICLE_DELETED } interface Node { id: ID! } type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! startCursor: String endCursor: String } type UserError { code: String! message: String! field: [String!] } # --------------------------------------------------------------------------- # Shop / App # --------------------------------------------------------------------------- type Shop implements Node { id: ID! name: String! domain: String currency: CurrencyCode! timezone: String email: String createdAt: DateTime! updatedAt: DateTime! } type App implements Node { id: ID! name: String! version: String } type AppInstallation implements Node { id: ID! app: App! shop: Shop! status: AppInstallationStatus! grantedScopes: [String!]! installedAt: DateTime! updatedAt: DateTime! } # --------------------------------------------------------------------------- # Catalog # --------------------------------------------------------------------------- type Product implements Node { id: ID! title: String! handle: String! description: String vendor: String productType: String status: ProductStatus! tags: [String!]! variants(first: Int = 25, after: String): ProductVariantConnection! collections(first: Int = 25, after: String): CollectionConnection! createdAt: DateTime! updatedAt: DateTime! } type ProductVariant implements Node { id: ID! product: Product! title: String! sku: String price: Decimal! compareAtPrice: Decimal inventoryQuantity: Int availableForSale: Boolean! createdAt: DateTime! updatedAt: DateTime! } type Collection implements Node { id: ID! title: String! handle: String! description: String products(first: Int = 25, after: String): ProductConnection! createdAt: DateTime! updatedAt: DateTime! } type ProductEdge { cursor: String! node: Product! } type ProductConnection { edges: [ProductEdge!]! nodes: [Product!]! pageInfo: PageInfo! } type ProductVariantEdge { cursor: String! node: ProductVariant! } type ProductVariantConnection { edges: [ProductVariantEdge!]! nodes: [ProductVariant!]! pageInfo: PageInfo! } type CollectionEdge { cursor: String! node: Collection! } type CollectionConnection { edges: [CollectionEdge!]! nodes: [Collection!]! pageInfo: PageInfo! } # --------------------------------------------------------------------------- # Customers / Orders # --------------------------------------------------------------------------- type Customer implements Node { id: ID! firstName: String lastName: String email: String phone: String orders(first: Int = 25, after: String): OrderConnection! createdAt: DateTime! updatedAt: DateTime! } type Order implements Node { id: ID! name: String! status: OrderStatus! financialStatus: FinancialStatus fulfillmentStatus: FulfillmentStatus customer: Customer email: String currency: CurrencyCode! subtotal: Decimal! total: Decimal! lineItems(first: Int = 25, after: String): OrderLineItemConnection! createdAt: DateTime! updatedAt: DateTime! } type OrderLineItem implements Node { id: ID! title: String! quantity: Int! unitPrice: Decimal! totalPrice: Decimal! variant: ProductVariant } type CustomerEdge { cursor: String! node: Customer! } type CustomerConnection { edges: [CustomerEdge!]! nodes: [Customer!]! pageInfo: PageInfo! } type OrderEdge { cursor: String! node: Order! } type OrderConnection { edges: [OrderEdge!]! nodes: [Order!]! pageInfo: PageInfo! } type OrderLineItemEdge { cursor: String! node: OrderLineItem! } type OrderLineItemConnection { edges: [OrderLineItemEdge!]! nodes: [OrderLineItem!]! pageInfo: PageInfo! } # --------------------------------------------------------------------------- # Inventory / Discounts / Content / Shipping # --------------------------------------------------------------------------- type InventoryItem implements Node { id: ID! sku: String tracked: Boolean! levels(first: Int = 25, after: String): InventoryLevelConnection! createdAt: DateTime! updatedAt: DateTime! } type InventoryLevel implements Node { id: ID! available: Int! location: String updatedAt: DateTime! } type InventoryItemEdge { cursor: String! node: InventoryItem! } type InventoryItemConnection { edges: [InventoryItemEdge!]! nodes: [InventoryItem!]! pageInfo: PageInfo! } type InventoryLevelEdge { cursor: String! node: InventoryLevel! } type InventoryLevelConnection { edges: [InventoryLevelEdge!]! nodes: [InventoryLevel!]! pageInfo: PageInfo! } type Discount implements Node { id: ID! code: String title: String! status: DiscountStatus! startsAt: DateTime endsAt: DateTime createdAt: DateTime! updatedAt: DateTime! } type DiscountEdge { cursor: String! node: Discount! } type DiscountConnection { edges: [DiscountEdge!]! nodes: [Discount!]! pageInfo: PageInfo! } type Page implements Node { id: ID! title: String! handle: String! bodyHtml: String publishedAt: DateTime createdAt: DateTime! updatedAt: DateTime! } type Blog implements Node { id: ID! title: String! handle: String! articles(first: Int = 25, after: String): ArticleConnection! createdAt: DateTime! updatedAt: DateTime! } type Article implements Node { id: ID! blog: Blog! title: String! handle: String! bodyHtml: String author: String publishedAt: DateTime createdAt: DateTime! updatedAt: DateTime! } type PageEdge { cursor: String! node: Page! } type PageConnection { edges: [PageEdge!]! nodes: [Page!]! pageInfo: PageInfo! } type BlogEdge { cursor: String! node: Blog! } type BlogConnection { edges: [BlogEdge!]! nodes: [Blog!]! pageInfo: PageInfo! } type ArticleEdge { cursor: String! node: Article! } type ArticleConnection { edges: [ArticleEdge!]! nodes: [Article!]! pageInfo: PageInfo! } type ShippingZone implements Node { id: ID! name: String! rates(first: Int = 25, after: String): ShippingRateConnection! } type ShippingRate implements Node { id: ID! name: String! price: Decimal! currency: CurrencyCode! } type ShippingRateEdge { cursor: String! node: ShippingRate! } type ShippingRateConnection { edges: [ShippingRateEdge!]! nodes: [ShippingRate!]! pageInfo: PageInfo! } # --------------------------------------------------------------------------- # Webhooks # --------------------------------------------------------------------------- type WebhookSubscription implements Node { id: ID! topic: WebhookTopic! endpointUrl: URL! createdAt: DateTime! updatedAt: DateTime! } type WebhookSubscriptionEdge { cursor: String! node: WebhookSubscription! } type WebhookSubscriptionConnection { edges: [WebhookSubscriptionEdge!]! nodes: [WebhookSubscription!]! pageInfo: PageInfo! } # --------------------------------------------------------------------------- # Query # --------------------------------------------------------------------------- type Query { node(id: ID!): Node shop: Shop! product(id: ID!): Product products( first: Int = 25 after: String query: String status: ProductStatus sortKey: ProductSortKey = ID reverse: Boolean = false ): ProductConnection! collection(id: ID!): Collection collections( first: Int = 25 after: String query: String ): CollectionConnection! customer(id: ID!): Customer customers( first: Int = 25 after: String query: String ): CustomerConnection! order(id: ID!): Order orders( first: Int = 25 after: String query: String ): OrderConnection! inventoryItem(id: ID!): InventoryItem inventoryItems( first: Int = 25 after: String query: String ): InventoryItemConnection! discount(id: ID!): Discount discounts( first: Int = 25 after: String query: String ): DiscountConnection! page(id: ID!): Page pages( first: Int = 25 after: String query: String ): PageConnection! blog(id: ID!): Blog blogs( first: Int = 25 after: String query: String ): BlogConnection! appInstallation: AppInstallation! webhookSubscriptions( first: Int = 25 after: String ): WebhookSubscriptionConnection! } # --------------------------------------------------------------------------- # Inputs # --------------------------------------------------------------------------- input ProductCreateInput { title: String! handle: String description: String vendor: String productType: String status: ProductStatus tags: [String!] } input ProductUpdateInput { id: ID! title: String handle: String description: String vendor: String productType: String status: ProductStatus tags: [String!] """When set, reject update if resource changed (RESOURCE_VERSION_CONFLICT).""" expectedUpdatedAt: DateTime } input CollectionCreateInput { title: String! handle: String description: String } input CollectionUpdateInput { id: ID! title: String handle: String description: String expectedUpdatedAt: DateTime } input CustomerUpdateInput { id: ID! firstName: String lastName: String email: String phone: String expectedUpdatedAt: DateTime } input InventoryAdjustInput { inventoryItemId: ID! delta: Int! location: String } input DiscountCreateInput { title: String! code: String startsAt: DateTime endsAt: DateTime } input DiscountUpdateInput { id: ID! title: String code: String status: DiscountStatus startsAt: DateTime endsAt: DateTime expectedUpdatedAt: DateTime } input PageCreateInput { title: String! handle: String bodyHtml: String publishedAt: DateTime } input PageUpdateInput { id: ID! title: String handle: String bodyHtml: String publishedAt: DateTime expectedUpdatedAt: DateTime } input ArticleCreateInput { blogId: ID! title: String! handle: String bodyHtml: String author: String publishedAt: DateTime } input ArticleUpdateInput { id: ID! title: String handle: String bodyHtml: String author: String publishedAt: DateTime expectedUpdatedAt: DateTime } input WebhookSubscriptionCreateInput { topic: WebhookTopic! endpointUrl: URL! } # --------------------------------------------------------------------------- # Mutation payloads # --------------------------------------------------------------------------- type ProductCreatePayload { product: Product userErrors: [UserError!]! } type ProductUpdatePayload { product: Product userErrors: [UserError!]! } type ProductDeletePayload { deletedProductId: ID userErrors: [UserError!]! } type CollectionCreatePayload { collection: Collection userErrors: [UserError!]! } type CollectionUpdatePayload { collection: Collection userErrors: [UserError!]! } type CollectionDeletePayload { deletedCollectionId: ID userErrors: [UserError!]! } type CustomerUpdatePayload { customer: Customer userErrors: [UserError!]! } type InventoryAdjustPayload { inventoryLevel: InventoryLevel userErrors: [UserError!]! } type DiscountCreatePayload { discount: Discount userErrors: [UserError!]! } type DiscountUpdatePayload { discount: Discount userErrors: [UserError!]! } type DiscountDeletePayload { deletedDiscountId: ID userErrors: [UserError!]! } type PageCreatePayload { page: Page userErrors: [UserError!]! } type PageUpdatePayload { page: Page userErrors: [UserError!]! } type PageDeletePayload { deletedPageId: ID userErrors: [UserError!]! } type ArticleCreatePayload { article: Article userErrors: [UserError!]! } type ArticleUpdatePayload { article: Article userErrors: [UserError!]! } type ArticleDeletePayload { deletedArticleId: ID userErrors: [UserError!]! } type WebhookSubscriptionCreatePayload { webhookSubscription: WebhookSubscription userErrors: [UserError!]! } type WebhookSubscriptionDeletePayload { deletedWebhookSubscriptionId: ID userErrors: [UserError!]! } # --------------------------------------------------------------------------- # Mutation # --------------------------------------------------------------------------- type Mutation { productCreate(input: ProductCreateInput!): ProductCreatePayload! productUpdate(input: ProductUpdateInput!): ProductUpdatePayload! productDelete(id: ID!): ProductDeletePayload! collectionCreate(input: CollectionCreateInput!): CollectionCreatePayload! collectionUpdate(input: CollectionUpdateInput!): CollectionUpdatePayload! collectionDelete(id: ID!): CollectionDeletePayload! customerUpdate(input: CustomerUpdateInput!): CustomerUpdatePayload! inventoryAdjust(input: InventoryAdjustInput!): InventoryAdjustPayload! discountCreate(input: DiscountCreateInput!): DiscountCreatePayload! discountUpdate(input: DiscountUpdateInput!): DiscountUpdatePayload! discountDelete(id: ID!): DiscountDeletePayload! pageCreate(input: PageCreateInput!): PageCreatePayload! pageUpdate(input: PageUpdateInput!): PageUpdatePayload! pageDelete(id: ID!): PageDeletePayload! articleCreate(input: ArticleCreateInput!): ArticleCreatePayload! articleUpdate(input: ArticleUpdateInput!): ArticleUpdatePayload! articleDelete(id: ID!): ArticleDeletePayload! webhookSubscriptionCreate( input: WebhookSubscriptionCreateInput! ): WebhookSubscriptionCreatePayload! webhookSubscriptionDelete(id: ID!): WebhookSubscriptionDeletePayload! } # Pagination defaults (contract): Default page size 25, Maximum 100. # Filtering: prefer typed args (status, sortKey) over free-form query grammar in 2027-01. # Free-form `query` string is reserved; grammar TBD — do not treat as Verified.