Skip to content

Add-Product Search (Create-Order)

The slim product search behind the admin Create Order screen's "Add Product" modal. It answers one question — which product is the admin picking? — and returns just enough to render a picker row.

This is not the product listing. For the full admin datagrid, with every column and the Channel / Name / SKU / Attribute Family / Price / ID / Status / Type filters, use List Products (adminCatalogProducts). This page covers only the Create-Order picker.

Operation

OperationType
adminProductsQuery (cursor connection)

Arguments

ArgTypeDescription
firstIntPage size, default 30, capped at 50.
afterStringCursor from a previous pageInfo.endCursor.
lastIntPage size when paging backwards.
beforeStringCursor from a previous pageInfo.startCursor.
queryStringFree text — partial match against SKU or product name.
skuStringExact SKU.
typeStringsimple, configurable, bundle, downloadable, grouped, virtual, or booking.
statusInt0 disabled, 1 enabled. Omit to get both.
categoryIdIntRestrict to products in one category.
channelStringChannel code used to resolve name and price.
localeStringLocale code used to resolve name.

Arguments combine with AND — more arguments narrow the result. query and sku are separate: query is the partial "as you type" match, sku is exact.

Node Fields

FieldTypeDescription
idID!Resource identifier in IRI form, /api/admin/admin_products/<id>.
_idIntNumeric product id — the value to send when adding the item to a cart.
skuStringProduct SKU.
typeStringProduct type.
nameStringResolved for the requested channel and locale.
statusInt1 enabled, 0 disabled.
priceFloatMinimal price for the product.
formattedPriceStringThe same price rendered in the channel currency.
baseImageUrlStringMedium-size image URL, falling back to the theme placeholder when the product has no image.
isSaleableBooleanWhether the product can currently be sold.

The row is deliberately nine fields — no variants, bundle options, images array, or attribute values. Use Product Detail once a product is picked.

Two fields behave unlike their storefront counterparts:

  • status and price are typed numbers here, not strings. Elsewhere in the admin catalog schema the same concepts arrive as strings — do not share a parsing helper between this query and adminCatalogProducts.
  • baseImageUrl is never null. A product without an image gets the theme's placeholder URL, so an "is there an image?" check on this field always says yes.

How It Differs From the Storefront Query

  • No implicit status = 1 filter. The storefront products query hides disabled products; this one returns every status so an admin can find a draft or disabled product. Pass status: 1 explicitly if you want only enabled ones.
  • Booking products are returned. They are listed so the admin can find them, but adding one to a draft cart fails — see Add Item to Cart. This mirrors the admin panel, whose Create-Order screen ships no booking form.
  • Nine fields, not the full product schema.

Errors

Requires an admin Bearer token. There is no separate permission gate on the search itself.

Released under the MIT License.