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 (GET /api/admin/catalog/products). This page covers only the Create-Order picker.

Endpoint

EndpointMethod
/api/admin/productsGET

Results come back in the { data, meta } envelope used by every admin collection.

Query Parameters

ParameterTypeDescription
pageintegerPage number, default 1.
per_pageintegerItems per page, default 30, capped at 50.
querystringFree text — partial match against SKU or product name.
skustringExact SKU.
typestringsimple, configurable, bundle, downloadable, grouped, virtual, or booking.
statusinteger0 disabled, 1 enabled. Omit to get both.
categoryIdintegerRestrict to products in one category.
channelstringChannel code used to resolve name and price.
localestringLocale code used to resolve name.
sortstringid, sku, created_at, or updated_at.
orderstringasc or desc. Defaults to desc.

Parameters combine with AND — each one you add narrows the result. query and sku are separate: query is the partial "as you type" match, sku is exact.

Note the page size here is 30, not the 10 used by every other admin collection — the picker is built to show a long scroll list.

Row Shape

FieldTypeDescription
idintegerNumeric product id — the value to send when adding the item to a cart.
skustringProduct SKU.
typestringProduct type.
namestring|nullResolved for the requested channel and locale.
statusinteger|null1 enabled, 0 disabled.
pricenumber|nullMinimal price for the product.
formattedPricestring|nullThe 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 counterparts elsewhere:

  • 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.
  • name and status can both be null for a product created through the API but never completed in step two — the picker still lists it. Fall back to sku for the display label.

How It Differs From /api/shop/products

ShopAdmin
Default status filterOnly status = 1 and visible_individually = 1None — every status returned
Booking productsHidden by storefront visibility rulesListed, but blocked when added to a draft cart
Row payloadFull storefront productNine fields
PaginationResponse headers (X-Total-Count, X-Page, …)Body envelope ({ data, meta }) — no pagination headers
AuthenticationStorefront key, plus an optional customer tokenAdmin Bearer token

Booking Products

Booking products are returned so the admin can find them, but adding one to a draft cart via POST /api/admin/carts/{id}/items fails with HTTP 400 and "Booking products cannot be added to an admin draft order." This mirrors the admin panel, whose Create-Order screen ships no booking form.

Errors

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

Released under the MIT License.