Queries
seller
A seller's profile by slug: identity, links, rating and policies.
seller returns a seller's profile from their slug, with what a seller page needs: description, links, rating and policies.
seller(slug: String!): StorefrontSellerProfileDto!Arguments
| Argument | Type | Rule |
|---|---|---|
slug | String! | Up to 100 characters. Surrounding spaces are trimmed. |
StorefrontSellerProfileDto
| Field | Type | Description |
|---|---|---|
id | String! | Seller ID. |
name | String! | Name. |
slug | String! | Slug. |
logo | String | Logo URL. |
banner | String | Banner URL. |
tagline | String | Short tagline. |
verified | Boolean! | true when verified. |
description | String | Description. |
links | StorefrontSellerLinksDto! | website, facebook, instagram, tikTok, youTube, twitter, linkedIn and whatsApp, all String. |
linkStyle | SellerLinkStyle! | ICONS or TEXT: how to display the links. |
memberSince | DateTime! | Date the seller joined the marketplace. |
rating.average | Decimal! | Average rating. |
rating.totalReviews | Int! | Reviews counted in the average. |
deliveryPolicy | String | Delivery policy. |
privacyAndSecurityPolicy | String | Privacy and security policy. |
Example
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: my-store" \
--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": "Kitchen and tableware.",
"links": { "website": "https://acme.pe", "instagram": null, "whatsApp": null },
"linkStyle": "ICONS",
"rating": { "average": 4.5, "totalReviews": 10 },
"deliveryPolicy": "Delivery in 2 to 4 business days.",
"privacyAndSecurityPolicy": null
}
}
}Errors
| Code | Cause |
|---|---|
BAD_USER_INPUT | slug is empty or longer than 100 characters. |
NOT_FOUND | The seller doesn't exist in the store. |
STORE_CONTEXT_REQUIRED | x-Store-Domain is missing or doesn't match a store. |
REST equivalent
GET / returns the same profile.
Last updated: