Consultas
seller
Perfil de un vendedor por su slug: identidad, enlaces, calificación y políticas.
seller devuelve el perfil de un vendedor a partir de su slug, con lo necesario para su página: descripción, enlaces, calificación y políticas.
seller(slug: String!): StorefrontSellerProfileDto!Argumentos
| Argumento | Tipo | Regla |
|---|---|---|
slug | String! | Hasta 100 caracteres. Se recortan los espacios. |
StorefrontSellerProfileDto
| Campo | Tipo | Descripción |
|---|---|---|
id | String! | ID del vendedor. |
name | String! | Nombre. |
slug | String! | Slug. |
logo | String | URL del logo. |
banner | String | URL del banner. |
tagline | String | Frase corta. |
verified | Boolean! | true si está verificado. |
description | String | Descripción. |
links | StorefrontSellerLinksDto! | website, facebook, instagram, tikTok, youTube, twitter, linkedIn y whatsApp, todos String. |
linkStyle | SellerLinkStyle! | ICONS o TEXT: cómo mostrar los enlaces. |
memberSince | DateTime! | Fecha de alta en el marketplace. |
rating.average | Decimal! | Calificación promedio. |
rating.totalReviews | Int! | Reseñas incluidas en el promedio. |
deliveryPolicy | String | Política de entrega. |
privacyAndSecurityPolicy | String | Política de privacidad y seguridad. |
Ejemplo
query Seller($slug: String!) {
seller(slug: $slug) {
id
name
slug
logo
description
links { website instagram whatsApp }
linkStyle
rating { average totalReviews }
deliveryPolicy
privacyAndSecurityPolicy
}
}curl --request POST "https://storefront.ecomiq.pe/graphql" \
--header "Content-Type: application/json" \
--header "x-Store-Domain: mi-tienda" \
--data-binary '{
"query": "query Seller($slug: String!) { seller(slug: $slug) { id name slug logo description links { website instagram whatsApp } linkStyle rating { average totalReviews } deliveryPolicy privacyAndSecurityPolicy } }",
"variables": { "slug": "acme" }
}'{
"data": {
"seller": {
"id": "7204558912004325310",
"name": "Acme",
"slug": "acme",
"logo": null,
"description": "Menaje y cocina.",
"links": { "website": "https://acme.pe", "instagram": null, "whatsApp": null },
"linkStyle": "ICONS",
"rating": { "average": 4.5, "totalReviews": 10 },
"deliveryPolicy": "Entrega en 2 a 4 días hábiles.",
"privacyAndSecurityPolicy": null
}
}
}Errores
| Código | Causa |
|---|---|
BAD_USER_INPUT | slug vacío o de más de 100 caracteres. |
NOT_FOUND | El vendedor no existe en la tienda. |
STORE_CONTEXT_REQUIRED | x-Store-Domain falta o no corresponde a una tienda. |
Equivalente REST
GET / devuelve el mismo perfil.
Última actualización: