GET
/api-client/search
apiClientUniversalSearch · Universal Search
API_CLIENT catalog.read + PUBLIC_API, tenant derived from key. Only active variants of active published products, including optional exact unit hits. includeArchived=true rejected. Exact pipeline precedence: IMEI, SKU, barcode, serial, model. Prefix FTS and word trigram are fallback only when there are no authorized visible exact matches. IMEI/SKU/serial are exact/indexed and never enter automatic text projection. Unit branches participate only with BOTH inventory.read and inventory.serials.read checked freshly inside transaction; lacking either quietly skips unit lookup. Unit hits expose IDs/status/version/condition/grade with safe catalog fields, no IMEI/serial, custody, actor, arbitrary attributes, costs, prices or audit. Text indexes name/active brand/model/storage/color/condition/grade/SIM and curated aliases using simple tsvector, unaccent and pg_trgm; aliases managed by Catalog write. Literal input, no user tsquery syntax. Stage ascending/rank descending/kind/id tie break, dedup per kind/id. No total counts or side-effect writes; query/cursor are never logged. Fresh filters enforced after projection. No anonymous access, external search service or business UI.
- Autenticación
- PlatformApiKey · http bearer
- required-scopes
catalog.read- optional-serial-scopes
inventory.readinventory.serials.read
Ejemplo
Los valores entre <> y {} son marcadores: sustitúyelos
por los tuyos antes de ejecutarlo.
curl --request GET \ --url 'https://api.marky.ec/v1/api-client/search?q=<q>' \ --header 'Authorization: Bearer <PlatformApiKey>'
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
qobligatorio
|
query | stringlongitud mín. 1longitud máx. 200 |
NFKC/trim/collapse spaces, max12 alphanumeric tokens; no controls. Exact input may be one character; text prefixes ignore tokens shorter than two; fuzzy requires at least three alphanumeric characters. |
limit
|
query | integermín. 1máx. 100por defecto 20 |
|
cursor
|
query | stringpatrón ^[A-Za-z0-9_-]+$longitud máx. 600 |
|
includeArchived
|
query | booleanpor defecto false |
Human ERP only; true rejected for API clients. |
Respuestas
200 Ranked search page; exact hits first, each resource once. Empty results return items=[] and nextCursor=null.
application/jsonSearchPage
objectsin otras propiedades
-
itemsobligatorioarrayelementos máx. 100Cada elementoExactamente una deSearchVariantobjectsin otras propiedades-
kindobligatoriostringvalor fijo "VARIANT" -
idobligatoriostringformato uuid -
variantIdobligatoriostringformato uuid -
productIdobligatoriostringformato uuid -
productNameobligatoriostring -
skuobligatoriostring -
matchobligatoriostringuno de "EXACT_IMEI", "EXACT_SKU", "EXACT_BARCODE", "EXACT_SERIAL", "EXACT_MODEL", "TEXT", "TRIGRAM" -
modelNumberobligatoriostring | nulllongitud máx. 100 -
barcodeobligatoriostring | nulllongitud máx. 100 -
storageobligatoriostring | nulllongitud máx. 100 -
colorobligatoriostring | nulllongitud máx. 100 -
conditionobligatoriouno de "NEW", "USED", "REFURBISHED", "OPEN_BOX", "AS_IS", null -
gradeobligatoriouno de "A", "B", "C", null -
simTypeobligatoriouno de "ESIM", "PHYSICAL_SIM", "PHYSICAL_ESIM", "DUAL_SIM", "NOT_APPLICABLE"por defecto NOT_APPLICABLE
-
SearchUnitobjectsin otras propiedades-
kindobligatoriostringvalor fijo "INVENTORY_UNIT" -
idobligatoriostringformato uuid -
variantIdobligatoriostringformato uuid -
productIdobligatoriostringformato uuid -
productNameobligatoriostring -
skuobligatoriostring -
matchobligatoriostringuno de "EXACT_IMEI", "EXACT_SKU", "EXACT_BARCODE", "EXACT_SERIAL", "EXACT_MODEL", "TEXT", "TRIGRAM" -
modelNumberobligatoriostring | nulllongitud máx. 100 -
barcodeobligatoriostring | nulllongitud máx. 100 -
storageobligatoriostring | nulllongitud máx. 100 -
colorobligatoriostring | nulllongitud máx. 100 -
conditionobligatoriouno de "NEW", "USED", "REFURBISHED", "OPEN_BOX", "AS_IS", null -
gradeobligatoriouno de "A", "B", "C", null -
simTypeobligatoriouno de "ESIM", "PHYSICAL_SIM", "PHYSICAL_ESIM", "DUAL_SIM", "NOT_APPLICABLE"por defecto NOT_APPLICABLE -
unitStatusobligatoriostringuno de "AVAILABLE", "RESERVED", "SOLD", "IN_TRANSIT", "DAMAGED", "RETURNED", "RMA", "LOST", "QUARANTINED" -
unitVersionobligatoriointegermín. 1
-
-
nextCursorobligatoriostring | nulllongitud máx. 600Opaque cursor bound to normalized input, tenant/principal, archive visibility and current serial capability; fresh state may change results between pages.
400 Invalid request
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
401 Missing or invalid access token
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
403 Identity, membership or permission denied
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
404 Unknown resource
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
409 Duplicate permanent identity/IMEI, stale unit version, reserved/illegal unit state, custody/legal entity constraint or idempotency conflict.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
413 Payload too large
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
429 Per-minute rate or monthly quota exceeded; authenticated API clients require PUBLIC_API entitlement.
-
Retry-Afterintegermín. 1Seconds before retrying; quota reset is UTC next month.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
500 Internal failure
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-
503 Auth/database/governance unavailable; no memory fallback for Redis.
application/problem+jsonProblemDetails
objectsin otras propiedades
-
typeobligatoriovalor fijo "about:blank" -
statusobligatoriointeger -
codeobligatoriostring -
titleobligatoriostring -
detailobligatoriostring -
requestIdobligatoriostringformato uuid -
errorsarrayelementos máx. 200Where each problem is, for the codes that can say it: a JSON pointer into the request or the record (`/items/0/devices/1/imei1`) and the reason. A line of a serialized article that is short of units also says how many it bills and how many are identified. Never a value typed by the user, and never an identifier of a unit.
Cada elementoobjectsin otras propiedades-
pointerobligatoriostring -
codeobligatoriostring -
requiredintegermín. 0máx. 1000For a line short of units (UNITS_DIFFER_FROM_QUANTITY, RECEIPT_REQUIRED, DELIVERY_REQUIRED): how many units the line bills.
-
identifiedintegermín. 0máx. 1000For the same line: how many units are identified and linked to it. Given to every reader of the document; no IMEI or serial number is.
-