Skip to main content

Queries

  • product — Fetch a single product by its id.
  • productCustomsUpdateJob (Experimental) — Fetch a job started by productCustomsUpdate. Null when no job of this store has the id.
  • productFamilies — List product families.
  • productFamily — Fetch a single product family by its id.
  • products — List products, optionally filtered by product family.

Mutations

  • createProductFamily — Create a new product family.
  • deleteProduct — Delete a product. Returns true if an owned product was deleted, false if none matched. Throws a 409 CONFLICT error (with an extension code of PRODUCT_SOURCE_MANAGED, PRODUCT_HAS_LISTING, or PRODUCT_HAS_INVENTORY) if the product is ineligible for deletion.
  • deleteProductFamily — Delete a product family and all of its products. Returns true if an owned product family was deleted, false if none matched. Throws a 409 CONFLICT error (with an extension code of PRODUCT_SOURCE_MANAGED, PRODUCT_HAS_LISTING, or PRODUCT_HAS_INVENTORY) if the family or any product is ineligible for deletion.
  • productCustomsUpdate (Experimental) — Save customs details (HS code, country of origin, customs description, material, weight, dimensions, manufacturer) on product variants, the same job as the customs CSV upload in the merchant app. Each row names variants by sourceId or sku and carries only the fields to change. Rows are validated first; the ones that are ready are saved by a background job, which productCustomsUpdateJob reports. With dryRun, nothing is saved and the result only says what each row would do. A variant of another store is never found. Throws a 400 error with an extension code of NO_PRODUCT_CUSTOMS_ROWS_READY when no row is ready to save, or BAD_USER_INPUT when rows is empty or has more than 500 rows.
  • syncSalesChannelVariants — Resolve sales channel variant ids to products here, syncing any that do not exist yet. Returns one entry per requested variant id, in the order given; a variant the sales channel does not have resolves to NOT_FOUND rather than failing the request. By default, variants already present are returned without calling the sales channel; with mode UPSERT, every requested variant’s product is re-synced. Throws a 400 error when a variant id is not in the sales channel’s id format (for Shopify, gid://shopify/ProductVariant/<numeric id>), and a 400 error (with an extension code of SALES_CHANNEL_NOT_CONNECTED) when the sales channel is not connected.

Objects

  • Attribute — A typed attribute defined by the merchant and attached to a product, product family or the account.
  • Dimensions — A product’s length, width, and height expressed in a single shared unit.
  • Manufacturer — A company that makes products, as declared on customs paperwork.
  • Product — A specific sellable product (a variant under a product family).
  • ProductCustomsRowPreview (Experimental) — What saving one row of a customs update does.
  • ProductCustomsUpdate (Experimental) — The outcome of a product customs update: the job saving the ready rows, and what each row does.
  • ProductCustomsUpdateJob (Experimental) — The background job productCustomsUpdate starts to save the ready rows.
  • ProductFamily — A merchant catalog item — a group of related products (variants).
  • ProductFamilyImage — An image attached to a product family.
  • ProductFamilyOption — A variant option (e.g. Size, Color) for a product family, with its allowed values.
  • ProductImage — An image attached to a specific product (variant).
  • ProductOptionValue — A variant’s selected value for one of its family’s options (e.g. Size: M).
  • SyncedVariant — The result of resolving one sales channel variant to a product here.
  • Weight — A weight as a { value, unit } pair, e.g. { value: 1.5, unit: KILOGRAM }.

Input objects

Enums

  • AttributeType — The data type of a merchant-defined attribute. Determines the JSON shape of the attribute’s value (documented on each enum value).
  • DimensionUnit — A unit of length used to express a product’s dimensions.
  • ProductCustomsRowStatus (Experimental) — What saving a row would do.
  • ProductCustomsUpdateJobState (Experimental) — Where a product customs update job is.
  • ProductCustomsUpdateRowOutcome (Experimental) — What became of one row of a product customs update job.
  • ProductFamilySortKey — A field this list can be ordered by; pass to the list’s orderBy argument and pair with reverse to flip direction.
  • ProductSortKey — A field this list can be ordered by; pass to the list’s orderBy argument and pair with reverse to flip direction.
  • SalesChannel — An external sales channel a product can be synced from on demand.
  • SalesChannelSyncMode — Which requested variants a sales channel sync fetches.
  • VariantSyncOutcome — What happened to one requested sales channel variant.
  • WeightUnit — A unit of mass used to express a product’s weight.