### Get Products by Discount Percentage Source: https://wakecommerce.readme.io/docs/storefront-api-products-1 Retrieves products filtered by a discount percentage range. ```APIDOC ## GET /products ### Description Retrieves a list of products filtered by a discount percentage range. ### Method GET ### Endpoint /products ### Query Parameters - **first** (integer) - Optional - The number of products to return. - **filters** (object) - Optional - Filtering criteria. - **prices** (object) - Pricing filters. - **discount_gte** (float) - Required (if used) - Minimum discount percentage (e.g., 0.3 for 30%). - **discount_lte** (float) - Required (if used) - Maximum discount percentage (e.g., 0.4 for 40%). ### Request Example ```json { "query": "query {\n products(first:10, filters:{prices: {discount_gte:0.3, discount_lte:0.4}}) {\n nodes {\n productId\n productVariantId\n prices {\n price\n discountPercentage\n }\n }\n }\n}" } ``` ### Response #### Success Response (200) - **data.products.nodes** (array) - An array of product objects. - **productId** (integer) - The ID of the product. - **productVariantId** (integer) - The ID of the product variant. - **prices** (object) - Pricing information. - **price** (float) - The price of the product. - **discountPercentage** (float) - The discount percentage. #### Response Example ```json { "data": { "products": { "nodes": [ { "productId": 203056, "productVariantId": 578953, "prices": { "price": 299.9, "discountPercentage": 0.39 } }, { "productId": 203117, "productVariantId": 579012, "prices": { "price": 129.9, "discountPercentage": 0.32 } } ] } } } ``` ``` -------------------------------- ### GraphQL CalculatePrices Query Example Source: https://wakecommerce.readme.io/docs/storefront-api-calculateprices This GraphQL query demonstrates how to request pricing and installment information for products. It specifies product variant IDs and quantities, and requests detailed breakdown of pricing, discounts, and available installment plans. The response includes fields like bestInstallment, discountPercentage, installmentPlans, listPrice, and the final price. ```graphql query{ calculatePrices(partnerAccessToken:"",products:[{productVariantId:4454, quantity:1}]){ bestInstallment { displayName name } discountPercentage discounted installmentPlans { displayName name installments{ discount fees number value } } listPrice multiplicationFactor price } } ``` -------------------------------- ### GraphQL: Query Product URL Info Source: https://wakecommerce.readme.io/docs/storefront-api-uri Example of querying the Uri to get information about a product URL. It retrieves the kind, productAlias, and productCategoriesIds. ```graphql query { uri(url:"222"){ kind productAlias productCategoriesIds } } ``` -------------------------------- ### settings.json Configuration Example Source: https://wakecommerce.readme.io/docs/settingsjson This snippet shows an example of how the 'breadcrumb' key can be configured within the settings.json file. It demonstrates a nested structure for defining navigation elements. ```json "breadcrumb": { "home_text": "Página inicial" } ``` -------------------------------- ### JSON Example for Product Page Event Source: https://wakecommerce.readme.io/docs/implementando-o-data-layer This JSON object represents an example of a 'page_view' event for a product on a hotsite. It includes details about the page, items, user, and session. This structure is useful for tracking user interactions and product information. ```json { "0": "event", "1": "page_view", "2": { "page": { "pageType": "HOTSITE", "name": "Calçados - Masculino - Loja Padrão" }, "items": [ { "item_id": 18799, "item_name": "Tênis Masculino Hovr Phantom 3 Se - Preto", "discount": 0, "price": 1199.99, "index": 2, "item_brand": "UNDER ARMOUR", "item_category": "Calçados", "item_category2": "Under Armour", "quantity": 1 } ], "user": { "id": "VISIT-e2b41a4b-2307-4791-8c2c-7fbua647d" }, "session": { "isLogged": false, "site": { "siteDomain": "https://lojapadrao.com.br" } } } } } ``` -------------------------------- ### API Request: Consultar Assinaturas de Usuário (GET) Source: https://wakecommerce.readme.io/docs/consultando-as-assinaturas-de-um-usuario Realiza uma requisição GET para a API da WakeCommerce para obter as assinaturas de um usuário específico. Os parâmetros opcionais incluem paginação e filtros para a quantidade de pedidos gerados. ```http GET https://api.fbits.net/assinaturas/{email}?pagina=1&quantidade=10&comPedidosGerados=true ``` -------------------------------- ### Filter Products by Discount Percentage Source: https://wakecommerce.readme.io/docs/storefront-api-products-1 This example shows how to filter products based on a discount percentage range, specifically between 30% and 40% (inclusive). It includes the GraphQL query and a sample response displaying products with their discount percentages. ```graphql { products(first:10, filters:{prices: {discount_gte:0.3, discount_lte:0.4}}) { nodes { productId productVariantId prices { price discountPercentage } } } } ``` ```json { "data": { "products": { "nodes": [ { "productId": 203056, "productVariantId": 578953, "prices": { "price": 299.9, "discountPercentage": 0.39 } }, { "productId": 203117, "productVariantId": 579012, "prices": { "price": 129.9, "discountPercentage": 0.32 } }, { "productId": 203051, "productVariantId": 578948, "prices": { "price": 129.9, "discountPercentage": 0.32 } }, { "productId": 203049, "productVariantId": 578946, "prices": { "price": 1199, "discountPercentage": 0.4 } }, { "productId": 221682, "productVariantId": 599080, "prices": { "price": 50, "discountPercentage": 0.38 } }, { "productId": 221680, "productVariantId": 599079, "prices": { "price": 50, "discountPercentage": 0.38 } }, { "productId": 222, "productVariantId": 446, "prices": { "price": 15000, "discountPercentage": 0.33 } }, { "productId": 222, "productVariantId": 445, "prices": { "price": 15000, "discountPercentage": 0.32 } }, { "productId": 222580, "productVariantId": 602094, "prices": { "price": 219.99, "discountPercentage": 0.33 } }, { "productId": 203329, "productVariantId": 579132, "prices": { "price": 99.9, "discountPercentage": 0.33 } } ] } } } ``` -------------------------------- ### GET Request para Listar Conteúdos - API Source: https://wakecommerce.readme.io/docs/consultando-todos-os-conteudos-cadastrados-1 Realiza uma requisição GET para o endpoint da API para buscar todos os conteúdos cadastrados. Aceita parâmetros de paginação como 'pagina' e 'quantidadePorPagina'. A resposta esperada é um array de objetos de conteúdo. ```HTTP GET https://api.fbits.net/conteudos ``` -------------------------------- ### Get Products with Same ParentId Source: https://wakecommerce.readme.io/docs/storefront-api-products-1 Retrieves products that share the same parent ID. ```APIDOC ## GET /products ### Description Retrieves a list of products that share the same parent ID. ### Method GET ### Endpoint /products ### Query Parameters - **first** (integer) - Optional - The number of products to return. - **filters** (object) - Optional - Filtering criteria. - **sameParentAs** (array of integers) - Required (if used) - An array of parent IDs to filter by. ### Request Example ```json { "query": "query {\n products(first:30, filters:{sameParentAs:[67890]}) {\n nodes {\n productName\n productId\n }\n }\n}" } ``` ### Response #### Success Response (200) - **data.products.nodes** (array) - An array of product objects. - **productName** (string) - The name of the product. - **productId** (integer) - The ID of the product. #### Response Example ```json { "data": { "products": { "nodes": [ { "productName": "Camiseta Esporte Branco", "productId": 123456 }, { "productName": "Camisa Esporte Vermelha", "productId": 123444 }, { "productName": "Camisa Esporte Azul", "productId": 123445 } ] } } } ``` ``` -------------------------------- ### Atualizar Configuração do SDK do Storefront Source: https://wakecommerce.readme.io/docs/migra%C3%A7%C3%A3o-do-storefront-10-para-o-20 Substitui o SDK antigo pelo SDK Full no arquivo de configuração do cliente do SDK. Certifique-se de que a URL do script inclua os parâmetros corretos para o tema e a versão. ```html ``` -------------------------------- ### Adicionar Propriedade de Versão de Componentes Wake Source: https://wakecommerce.readme.io/docs/migra%C3%A7%C3%A3o-do-storefront-10-para-o-20 Adiciona a propriedade 'wake_components_version' com o valor 'v1' ao arquivo settings.json. Esta configuração é crucial para o funcionamento correto dos componentes do Storefront 2.0. ```json { "wake_components_version": "v1" } ``` -------------------------------- ### Hotsite and Product Information Source: https://wakecommerce.readme.io/docs/storefront-api-hotsite This section provides an example of how to query for hotsite information, including aggregations, breadcrumbs, and product details for the first two products. ```APIDOC ## GET /websites/wakecommerce ### Description Retrieves information about a specific hotsite, including product details. ### Method GET ### Endpoint /websites/wakecommerce ### Query Parameters - **url** (string) - Required - The URL of the hotsite to query. - **products.first** (integer) - Optional - The number of products to retrieve. ### Request Example ```graphql query{ hotsite(url:"calcados/melissa"){ aggregations { maximumPrice minimumPrice } breadcrumbs { link text } expression subtype pageSize products (first: 2) { nodes { productId productName prices { price } } } seo{ content httpEquiv name scheme type } } } ``` ### Response #### Success Response (200) - **data** (object) - Contains the queried hotsite information. - **hotsite** (object) - Details of the hotsite. - **aggregations** (object) - Price aggregations (e.g., `maximumPrice`, `minimumPrice`). - **breadcrumbs** (array) - Navigation breadcrumbs. - **expression** (string) - Internal expression identifier. - **subtype** (string) - Subtype of the hotsite. - **pageSize** (integer) - Default page size for products. - **products** (object) - Product information. - **nodes** (array) - List of products. - **productId** (integer) - Unique identifier for the product. - **productName** (string) - Name of the product. - **prices** (object) - Pricing information. - **price** (number) - The current price of the product. - **seo** (array) - SEO related meta tags and title information. #### Response Example ```json { "data": { "hotsite": { "aggregations": { "maximumPrice": 7650, "minimumPrice": 8.5 }, "breadcrumbs": [ { "link": "/calcados", "text": "Calçados" }, { "link": "/calcados/melissa", "text": "Melissa" } ], "expression": "categoriaHotSite__ix:99calcados99melissa99", "subtype": "CATEGORY", "pageSize": 24, "products": { "nodes": [ { "productId": 43, "productName": "Bota Melissa Ankle Boot Jeremy Scott Azul Preto 31916", "prices": { "price": 7650 } }, { "productId": 45, "productName": "Bota Melissa Ankle Boot Jeremy Scott Preto Opaco 31916", "prices": { "price": 7650 } } ] }, "seo": [ { "content": "Melissa", "httpEquiv": null, "name": "keywords", "scheme": null, "type": "META" }, { "content": "Melissa - Loja", "httpEquiv": null, "name": "description", "scheme": null, "type": "META" }, { "content": "text/html; charset=iso-8859-1", "httpEquiv": "content-type", "name": null, "scheme": null, "type": "META" }, { "content": "Melissa - Calçados - Loja", "httpEquiv": null, "name": null, "scheme": null, "type": "TITLE" } ] } } } ``` ``` -------------------------------- ### GET Request to /templates Endpoint Source: https://wakecommerce.readme.io/docs/template-1 This snippet demonstrates the GET request to the /templates endpoint to retrieve registered templates. It shows the endpoint URL and an example of the JSON response body. ```HTTP GET https://api.fbits.net/templates ``` ```JSON [ { "templateId": 1, "nome": "../background/index", "caminho": "../background/index" }, { "templateId": 2, "nome": "Busca", "caminho": "../Busca/Index" }, { "templateId": 3, "nome": "../CabecalhoDinamico/Index", "caminho": "../CabecalhoDinamico/Index" }, { "templateId": 4, "nome": "../Carrossel/Index", "caminho": "../Carrossel/Index" } ] ``` -------------------------------- ### Consult Shipping List - GET Request Source: https://wakecommerce.readme.io/docs/consultando-uma-lista-de-fretes This snippet demonstrates how to make a GET request to the /fretes endpoint to retrieve a list of shipping configurations. It shows the request URL and an example JSON response body. ```HTTP GET https://api.fbits.net/fretes ``` ```JSON [ { "freteId": 1, "nome": "Frete Padrão", "ativo": false, "volumeMaximo": 0, "pesoCubado": 0, "entregaAgendadaConfiguracaoId": 15, "linkRastreamento": null, "ehAssinatura": false, "larguraMaxima": 0, "alturaMaxima": 0, "comprimentoMaximo": 0, "limiteMaximoDimensoes": 0, "limitePesoCubado": 0, "tempoMinimoDespacho": 0, "centroDistribuicaoId": 25, "valorMinimoProdutos": 0 }, { "freteId": 100, "nome": "Intelipost", "ativo": false, "volumeMaximo": 0, "pesoCubado": 0, "entregaAgendadaConfiguracaoId": 15, "linkRastreamento": null, "ehAssinatura": false, "larguraMaxima": 0, "alturaMaxima": 0, "comprimentoMaximo": 0, "limiteMaximoDimensoes": 0, "limitePesoCubado": 0, "tempoMinimoDespacho": 0, "centroDistribuicaoId": 31, "valorMinimoProdutos": 0, "cotacaoEmHoras": true, "horarioCorte": "2", "prazoAdicional": 3 } ] ``` -------------------------------- ### JSON-LD Mínimo para Dados Estruturados de Produto Source: https://wakecommerce.readme.io/docs/implementa%C3%A7%C3%A3o-de-dados-estruturados-de-produto Este snippet JSON-LD demonstra a estrutura mínima exigida pelo Google para dados de produto em páginas de e-commerce. Inclui campos essenciais como nome, imagem, SKU, marca, descrição e detalhes da oferta (preço, moeda, disponibilidade, URL). Utiliza placeholders específicos do Wake para preenchimento dinâmico. ```html ``` -------------------------------- ### Consultar Pedidos por Situação (GET) Source: https://wakecommerce.readme.io/docs/consultando-uma-listagem-de-pedido-por-situacao Realiza a consulta de uma listagem de pedidos com base em suas situações. Recomenda-se o uso de Webhooks para melhor performance. Parâmetros opcionais incluem datas, formas de pagamento e paginação. ```http GET https://api.fbits.net/pedidos/situacaoPedido/{situacoesPedido} ``` -------------------------------- ### Get First 2 Products from 'Moda' Category Source: https://wakecommerce.readme.io/docs/storefront-api-products-1 This example demonstrates how to retrieve the first two products from the 'Moda' category (ID 801), filtered by their main variant. It shows the GraphQL query and the expected JSON response. ```graphql query { products(first:2, filters:{categoryId:[801], mainVariant:true}) { nodes { productId productName prices { price } productBrand { name } } } } ``` ```json { "data": { "products": { "nodes": [ { "productId": 70231, "productName": "AGASALHO DUO FEMININO", "prices": { "price": 367.19 }, "productBrand": { "name": "SPEEDO" } }, { "productId": 123055, "productName": "Bolsa Feminina", "prices": { "price": 1095.34 }, "productBrand": { "name": "Adidas" } } ] } } } ``` -------------------------------- ### Get Products by Category and Main Variant Source: https://wakecommerce.readme.io/docs/storefront-api-products-1 Retrieves the first two products from the 'Fashion' category (ID 801), filtered by their main variant. ```APIDOC ## GET /products ### Description Retrieves a list of products filtered by category and main variant. ### Method GET ### Endpoint /products ### Query Parameters - **first** (integer) - Optional - The number of products to return. - **filters** (object) - Optional - Filtering criteria. - **categoryId** (integer) - Required (if used) - The ID of the category to filter by. - **mainVariant** (boolean) - Optional - Whether to filter by the main variant of the product. ### Request Example ```json { "query": "query {\n products(first:2, filters:{categoryId:[801], mainVariant:true}) {\n nodes {\n productId\n productName\n prices {\n price\n }\n productBrand {\n name\n }\n }\n }\n}" } ``` ### Response #### Success Response (200) - **data.products.nodes** (array) - An array of product objects. - **productId** (integer) - The ID of the product. - **productName** (string) - The name of the product. - **prices** (object) - Pricing information. - **price** (float) - The price of the product. - **productBrand** (object) - Brand information. - **name** (string) - The name of the brand. #### Response Example ```json { "data": { "products": { "nodes": [ { "productId": 70231, "productName": "AGASALHO DUO FEMININO", "prices": { "price": 367.19 }, "productBrand": { "name": "SPEEDO" } }, { "productId": 123055, "productName": "Bolsa Feminina", "prices": { "price": 1095.34 }, "productBrand": { "name": "Adidas" } } ] } } } ``` ``` -------------------------------- ### Exemplo de Requisição API para Estoque e Informações do Produto Source: https://wakecommerce.readme.io/docs/informacoes-disponiveis-na-api-de-produto Exemplo de como requisitar tanto o estoque quanto as informações gerais do produto em uma única chamada de API. Múltiplos campos adicionais podem ser especificados, separados por vírgula. ```URL https://sualoja.com.br/produto/api/72426?camposAdicionais=estoque,informacao ``` -------------------------------- ### Exemplo JSON para Página Home Source: https://wakecommerce.readme.io/docs/implementando-o-data-layer Este snippet JSON demonstra a estrutura de dados para a página inicial, incluindo informações de evento, tipo e nome da página, detalhes do usuário e sessão. É útil para configurar o rastreamento de eventos na página Home. ```json { "0": "event", "1": "page_view", "2": { "page": { "pageType": "HOTSITE - HOME", "name": "Loja Padrão | Maior loja do segmento de moda" }, "items": [ null ], "user": { "id": "VISIT-e2b41a4b-2307-4791-8c2c-7fb5adoi647d" }, "session": { "isLogged": false, "site": { "siteDomain": "https://lojapadrao.com.br" } } } } ``` -------------------------------- ### Hotsite Buy List Products Source: https://wakecommerce.readme.io/docs/storefront-api-hotsite This example demonstrates how to retrieve product information from a hotsite that represents a buy list, including the buy list ID and associated products. ```APIDOC ## GET /websites/wakecommerce ### Description Retrieves information about products within a hotsite designated as a buy list, including the buy list ID and the products associated with it. ### Method GET ### Endpoint /websites/wakecommerce ### Query Parameters - **url** (string) - Required - The URL of the hotsite (e.g., "lista-compra"). - **products.first** (integer) - Optional - The number of products to retrieve. ### Request Example ```graphql query { hotsite(url: "lista-compra") { hotsiteId products(first: 2) { nodes{ buyListId alias buyListProducts{ productId productName } } } } } ``` ### Response #### Success Response (200) - **data** (object) - Contains the queried hotsite information. - **hotsite** (object) - Details of the hotsite. - **hotsiteId** (integer) - The unique identifier for the buy list hotsite. - **products** (object) - Product information within the buy list. - **nodes** (array) - List of products associated with the buy list. - **buyListId** (integer) - The ID of the buy list the product belongs to. - **alias** (string) - An alias or URL slug for the product within the buy list. - **buyListProducts** (array) - A list of products contained within this buy list item. - **productId** (integer) - Unique identifier for the product. - **productName** (string) - Name of the product. #### Response Example ```json { "data": { "hotsite": { "hotsiteId": 163640, "products": { "nodes": [ { "buyListId": 1391, "alias": "listacompra/biquini-agatha-nervura-marrom-1391", "buyListProducts": [ { "productId": 211667, "productName": "Top Agatha Nervura - Marrom" }, { "productId": 211668, "productName": "Calcinha Leila Nervura - Marrom" } ] }, { "buyListId": 1421, "alias": "listacompra/biquini-agatha-u-verde-1421", "buyListProducts": [ { "productId": 211778, "productName": "Top Agatha - Verde" }, { "productId": 211780, "productName": "Calcinha Leila - Verde" } ] } ] } } } } ``` ``` -------------------------------- ### Get Order Observations - JSON Response Example Source: https://wakecommerce.readme.io/docs/consultando-observacoes-de-um-pedido This JSON snippet demonstrates the structure of the response body when querying order observations. It includes the observation text, the user who made it, whether it's public, and the timestamp. ```json [ { "observacao": "teste 1", "usuario": "FBITS\\amanda.nascimento", "publica": true, "data": "2022-07-15T13:49:52.573" }, { "observacao": "teste 2", "usuario": "FBITS\\amanda.nascimento", "publica": true, "data": "2022-07-15T13:49:56.18" }, { "observacao": "teste 3", "usuario": "FBITS\\amanda.nascimento", "publica": false, "data": "2022-07-15T13:50:02.777" } ] ``` -------------------------------- ### POST /hotsites - Create Hotsite Source: https://wakecommerce.readme.io/docs/inserindo-um-hotsite Use this endpoint to insert a new hotsite. It allows for detailed configuration including name, dates, URL, pagination, templates, product lists, SEO, banners, content, and activation status. ```APIDOC ## POST /hotsites ### Description Inserts a new hotsite with various configuration options. ### Method POST ### Endpoint https://api.fbits.net/hotsites ### Parameters #### Request Body - **nome** (string) - Required - The name of the hotsite. - **dataInicio** (string) - Required - The start date of the hotsite (ISO 8601 format). - **dataFinal** (string) - Required - The end date of the hotsite (ISO 8601 format). - **url** (string) - Required - The URL for the hotsite. - **tamanhoPagina** (integer) - Required - The number of items per page. - **templateId** (integer) - Required - The ID of the template to use for the hotsite. Use GET /templates to retrieve available template IDs. - **ordenacao** (string) - Required - The sorting order for the hotsite (e.g., "Nenhuma"). - **listaProdutos** (object) - Required - Configuration for the product list. - **expressao** (string) - Required - Expression to filter products. Limited to 1024 items. - **produtos** (array) - Required - List of specific products. - **produtoId** (integer) - Required - The ID of the product. - **ordem** (integer) - Required - The order of the product in the list. - **seo** (object) - Optional - Search Engine Optimization settings. - **titulo** (string) - Optional - The SEO title. - **metas** (array) - Optional - Meta tags. - **conteudo** (string) - Required - The content of the meta tag. Limited to 3000 characters for "conteudo" in SEO data. - **nome** (string) - Optional - The name of the meta tag. - **httpEquiv** (string) - Optional - The http-equiv attribute. - **scheme** (string) - Optional - The scheme attribute. - **banners** (array) - Optional - List of banners to display. - **bannerId** (integer) - Required - The ID of the banner. - **conteudos** (array) - Optional - List of content elements. - **conteudoId** (integer) - Required - The ID of the content element. - **ativo** (boolean) - Required - Whether the hotsite is active. ### Request Example ```json { "nome": "string", "dataInicio": "2022-06-28T20:38:12.250Z", "dataFinal": "2022-06-28T20:38:12.250Z", "url": "string", "tamanhoPagina": 0, "templateId": 0, "ordenacao": "Nenhuma", "listaProdutos": { "expressao": "string", "produtos": [ { "produtoId": 0, "ordem": 0 } ] }, "seo": { "titulo": "string", "metas": [ { "conteudo": "string", "nome": "string", "httpEquiv": "string", "scheme": "string" } ] }, "banners": [ { "bannerId": 0 } ], "conteudos": [ { "conteudoId": 0 } ], "ativo": true } ``` ### Response #### Success Response (200) (Details of the success response are not provided in the input text.) #### Response Example (No example provided for the success response.) ``` -------------------------------- ### Get User Order IDs by Document - JSON Response Example Source: https://wakecommerce.readme.io/docs/consultando-uma-lista-contendo-o-id-dos-pedidos-de-um-usuario-atraves-do-documento This JSON response shows the structure of the data returned when querying for user order IDs by document. Each object in the array represents an order and includes the `pedidoId` and a link to retrieve full order details. ```json [ { "pedidoId": 2042, "links": [ { "href": "https://api.fbits.net/pedidos/2042", "rel": "pedidos", "method": "GET" } ] }, { "pedidoId": 2626, "links": [ { "href": "https://api.fbits.net/pedidos/2626", "rel": "pedidos", "method": "GET" } ] } ] ``` -------------------------------- ### GraphQL Request for CheckoutSelectInstallment Source: https://wakecommerce.readme.io/docs/checkoutselectinstallment This GraphQL mutation allows the selection of an installment plan for a checkout. It requires the checkout ID, the selected payment method ID, and the desired number of installments. The response includes checkout details and the selected installment information. ```graphql mutation ( $checkoutId: Uuid! $selectedPaymentMethodId: Uuid! $installmentNumber: Int! ) { checkoutSelectInstallment( checkoutId: $checkoutId selectedPaymentMethodId: $selectedPaymentMethodId installmentNumber: $installmentNumber ) { ...checkoutFields } } ``` -------------------------------- ### Configuração de Versão de Componentes Fechados (JSON) Source: https://wakecommerce.readme.io/docs/componentes-fechados Define a versão específica dos componentes fechados a ser utilizada no projeto, editando o arquivo settings.json. Se não especificada, a última versão estável é aplicada por padrão. ```json { "wake_components_version": "v1" } ``` -------------------------------- ### CheckoutSelectInstallment Mutation Source: https://wakecommerce.readme.io/docs/checkoutselectinstallment Allows the selection of an installment plan for a checkout. The installment plan is presented according to the store's configuration and the selected payment method. ```APIDOC ## POST /checkout/select/installment ### Description Allows the selection of an installment plan for a checkout. The installment plan is presented according to the store's configuration and the selected payment method. ### Method POST ### Endpoint /checkout/select/installment ### Parameters #### Request Body - **checkoutId** (Uuid) - Required - The ID of the cart. - **selectedPaymentMethodId** (Uuid) - Required - The ID of the payment method. - **installmentNumber** (Int) - Required - The number of installments. - **orderId** (Long) - Optional - The ID of the order. If provided, the payment method change will be applied to the order. ### Request Example ```json { "checkoutId": "a658584a-3b9e-467b-9d9c-870b27a5cdfa", "selectedPaymentMethodId": "d9bba011-bf2f-4961-bcb8-e089064cf3b9", "installmentNumber": 6, "orderId": null } ``` ### Response #### Success Response (200) - **checkoutId** (Uuid) - The ID of the checkout. - **selectedPaymentMethod** (Object) - Details of the selected payment method. - **id** (Uuid) - The ID of the payment method. - **selectedInstallment** (Object) - Details of the selected installment. - **adjustment** (Float) - The installment adjustment. - **number** (Int) - The number of installments. - **total** (Float) - The total amount for the installment. - **value** (Float) - The value of each installment. #### Response Example ```json { "data": { "checkoutSelectInstallment": { "cep": 5707001, "checkoutId": "a658584a-3b9e-467b-9d9c-870b27a5cdfa", "updateDate": "2023-06-05T14:20:37.953-03:00", "shippingFee": 0.0, "total": 1216.70, "subtotal": 1169.90, "selectedPaymentMethod": { "id": "d9bba011-bf2f-4961-bcb8-e089064cf3b9", "selectedInstallment": { "adjustment": 0, "number": 6, "total": 1216.7, "value": 202.78 } } } } } ``` ``` -------------------------------- ### Payment API Response Examples Source: https://wakecommerce.readme.io/docs/modelos-de-objetos-e-responses-no-checkout-versao-completa These JSON examples illustrate the different response structures for payment transactions, indicating the status of the operation and a descriptive message. ```json { "statusId":1, "message":"Minha mensagem" } ``` ```json { "statusId":2, "message":"Minha mensagem" } ``` ```json { "statusId":3, "message":"Minha mensagem" } ``` ```json { "statusId":4, "message":"Minha mensagem" } ``` -------------------------------- ### Atualização de Preço em Lote Source: https://wakecommerce.readme.io/docs/produtos Atualiza o preço de vários produtos de uma vez. Limite de 50 produtos por requisição. ```APIDOC ## POST /api/products/bulk/price ### Description Atualiza o preço de múltiplos produtos. O limite é de 50 produtos por requisição. ### Method POST ### Endpoint /api/products/bulk/price ### Parameters #### Request Body - **products** (array) - Required - Lista de produtos para atualização de preço. - **productId** (string) - Required - Identificador do produto. - **newPrice** (number) - Required - Novo preço do produto. ### Request Example ```json { "products": [ { "productId": "prod_123", "newPrice": 19.99 }, { "productId": "prod_456", "newPrice": 29.99 } ] } ``` ### Response #### Success Response (200) - **message** (string) - Mensagem de sucesso. #### Response Example ```json { "message": "Preços atualizados com sucesso." } ``` ``` -------------------------------- ### CheckoutSelectShippingQuote with Delivery Schedule - Example Variables JSON Source: https://wakecommerce.readme.io/docs/storefront-api-checkoutselectshippingquote Example JSON variables for the CheckoutSelectShippingQuote mutation when a delivery schedule is included. It shows the structure for `deliveryScheduleInput`. ```json { "checkoutId": "d8edf342-0a39-439d-9f37-b858b0f6ffd4", "shippingQuoteId": "0663cbab-2258-463e-912c-5beaf1930087", "deliveryScheduleInput": { "date": "2023-04-28T05:00:00.000-03:00", "periodId": 34 } } ``` -------------------------------- ### Compilação CSS com Tailwind CLI (Bash) Source: https://wakecommerce.readme.io/docs/componentes-fechados Comando para compilar arquivos CSS utilizando o Tailwind CSS CLI. Mapeia um arquivo de entrada (input) para um arquivo de saída (output) e habilita o modo watch para atualizações automáticas. ```bash tailwindcss.exe -i Assets/css/input_checkout.css -o Assets/css/output_checkout.css --watch ``` -------------------------------- ### Exemplo de Requisição API para Estoque Source: https://wakecommerce.readme.io/docs/informacoes-disponiveis-na-api-de-produto Exemplo de como requisitar informações de estoque de um produto via API. A URL inclui um parâmetro para especificar campos adicionais. ```URL https://sualoja.com.br/produto/api/72426?camposAdicionais=estoque ``` -------------------------------- ### GET /pedidos/{pedidoId} Source: https://wakecommerce.readme.io/docs/consultando-um-pedido-especifico Retrieves details for a specific order by its ID. You can also include additional fields to get more information about the order. ```APIDOC ## GET /pedidos/{pedidoId} ### Description Retrieves details for a specific order using its ID. It also supports an optional parameter to include additional data in the response. ### Method GET ### Endpoint https://api.fbits.net/pedidos/{pedidoId} ### Parameters #### Path Parameters - **pedidoId** (string) - Required - The ID of the order to search for. #### Query Parameters - **camposAdicionais** (string) - Optional - Specifies which extra data should be returned along with the order data. Multiple values can be selected. ### Response #### Success Response (200) - **valorSubtotalSemDesconto** (number) - The subtotal value without discount. - **embalagens** (array) - Packaging details for the order. - **personalizacao** (object) - Customization details for the order. - **valorFreteCliente** (number) - The customer's shipping cost. - **valorFreteEmpresa** (number) - The company's shipping cost. - **centroDistribuicaoItens** (array) - Distribution center information for order items. - **valorDescontoProduto** (number) - Discount value for a product. - **observacoesAdicionais** (string) - Additional notes added to the order. - **entregaAgendada** (boolean) - Indicates if the delivery is scheduled. - **retiradaNaLoja** (boolean) - Indicates if the order is for store pickup. - **detalhesContaCorrente** (object) - Details related to the current account. #### Response Example ```json { "valorSubtotalSemDesconto": 100.00, "embalagens": [], "personalizacao": {}, "valorFreteCliente": 10.00, "valorFreteEmpresa": 10.00, "centroDistribuicaoItens": [], "valorDescontoProduto": 5.00, "observacoesAdicionais": "Handle with care.", "entregaAgendada": false, "retiradaNaLoja": false, "detalhesContaCorrente": {} } ``` ``` -------------------------------- ### CheckoutSelectShippingQuote Mutation Response Example - JSON Source: https://wakecommerce.readme.io/docs/storefront-api-checkoutselectshippingquote An example JSON response for the CheckoutSelectShippingQuote mutation, illustrating the structure of the returned data including selected shipping details. ```json { "data": { "checkoutSelectShippingQuote": { "cep": 00000000, "checkoutId": "622a8e8d-d637-41a8-bdb7-e11cb4cb8c96", "shippingFee": 57.41, "selectedShipping": { "deadline": 8, "name": "Correios PAC 2", "shippingQuoteId": "12b445c1-c854-4450-910b-2981ec5843a4", "type": "Intelipost", "value": 57.41 } } } } ``` -------------------------------- ### components.json Structure and Example Source: https://wakecommerce.readme.io/docs/componentsjson Defines the structure of the components.json file, including attributes like name, path, params, and availability. It also provides a JSON example of a component definition. ```json [ { "name": "banners_carousel", "path": "banners_carousel.html", "params": [ { "name": "banners", "required": true }, { "name": "position", "required": false } ], "availableInAllPages": true } ] ``` -------------------------------- ### Exemplo de Requisição API para Informações do Produto Source: https://wakecommerce.readme.io/docs/informacoes-disponiveis-na-api-de-produto Exemplo de como requisitar informações gerais do produto via API. A URL utiliza o parâmetro 'camposAdicionais' para solicitar dados específicos. ```URL https://sualoja.com.br/produto/api/72426?camposAdicionais=informacao ```