Search products by name
Superseded by
GET /api/register/event/search(register). The audience builder now matches the product name directly via the genericeventfilter (type=buy_product) — no name→SKU step. This endpoint still works, but theboughtSku/person_order_itempath is legacy (removed at cutover).
Resolves free-text product-name terms into the set of SKUs (skuRefId) that
were sold under matching names. Powers the audience builder: the matched
SKUs feed the boughtSku audience filter in the register service.
terms is free text — whitespace-separated terms are ANDed (accepts a
space-separated string terms=a b or repeated terms[]=a&terms[]=b).
sandalia salto returns only SKUs whose product name contains both words
(same name string). Matching is case- and accent-insensitive (collation
utf8mb4_general_ci), so tenis matches TÊNIS.
The product name comes from order_item.productName (a per-line snapshot —
Guper has no separate product catalog). Results are grouped by skuRefId;
each entry returns a representative name and the matched-line count
(hits), ordered by hits desc. There is no interface scoping —
skuRefId is the organization's canonical SKU reference.
Auth: service-to-service RSA signature (see Internal › Integração ›
Signature). Organization is taken from the request context.
Worked example
1. Search — find the SKUs named "sandalia salto":
GET /api/order/product/search?terms=sandalia%20salto
{
"terms": ["sandalia", "salto"],
"total": 1,
"products": [
{ "sku": "47142", "name": "Sandalia Salto Alto 38", "hits": 14 }
]
}
2. Build the audience — feed the returned sku values into the register
audience query as a boughtSku filter (here: bought it in the last 3 months):
[
["boughtSku", "in", { "list": ["47142"] }, { "int": 3 }]
]
Combine with other filters via AND — e.g. men who bought it: prepend
["gender","equals",{"string":"male"}], "AND",. See Internal › Services ›
Register › Audiência por produto for the full boughtSku reference.
Try-it values populated from environment ACME (Demo)
Authentication
Token
Send your user token in the x-guper-authorization header.