### cURL Request to Get All Partners Source: https://wakecommerce.readme.io/reference/parceiro This snippet demonstrates how to make a GET request to the /parceiros endpoint using cURL to retrieve a list of all partners. It includes the necessary URL and an example header for JSON acceptance. ```shell curl --request GET \ --url https://api.fbits.net/parceiros \ --header 'accept: application/json' ``` -------------------------------- ### Request Body Example for Consultar Produtos Recusados Source: https://wakecommerce.readme.io/reference/consultar-produtos-recusados This JSON object represents an example request body for the 'Consultar Produtos Recusados' endpoint. It specifies filtering parameters such as page number, OMS account, store CNPJ, SKU code, and date ranges for refused products. No specific programming language is associated as this is a data structure example. ```json { "pagina": 1, "contaOms": "Loja1", "cnpjLoja": "17054226000178", "codigoSku": "01.01.0001", "pedidoOms": "", "DataInicialRecusa": "2023-11-01", "DataFinalRecusa": "2023-11-10" } ``` -------------------------------- ### Get Subscriptions List (Python) Source: https://wakecommerce.readme.io/reference/assinatura-1 This Python snippet shows how to get subscription data using the 'requests' library. It sends a GET request to the /assinaturas endpoint with the 'accept: application/json' header. ```python import requests url = "https://api.fbits.net/assinaturas" headers = { "accept": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Faturar Endpoint Request Body Example Source: https://wakecommerce.readme.io/reference/faturar This JSON object represents an example request body for the Faturar endpoint. It includes order identification, store details, and invoice information. Ensure all required fields are populated correctly for successful updates. ```json { "pedidoOms": "slr-123456-01", "contaOms": "loja1", "cnpjLoja": "99999999999999", "pedidoPdv": "98765", "numeroNf": "12345", "serieNf": "1", "chaveNf": "12345678901234567890123456789012345678901234", "dataEmissaoNf": "2022-05-15", "dataAutorizacaoNf": "2022-05-15T18:44:35.601Z", "protocoloAutorizacaoNf": "1234567890", "xmlNfe": "XML", "numeroNfPresente": null, "serieNfPresente": null, "chaveNfPresente": null, "dataEmissaoNfPresente": null, "dataAutorizacaoNfPresente": null, "protocoloAutorizacaoNfPresente": null, "XmlNfePresente": null } ``` -------------------------------- ### Response Body Example for Consultar Produtos Recusados Source: https://wakecommerce.readme.io/reference/consultar-produtos-recusados This JSON object illustrates the expected response structure from the 'Consultar Produtos Recusados' endpoint. It contains a success message and a 'dados' object which includes a list of refused products, pagination information, and total counts. No specific programming language is associated as this is a data structure example. ```json { "mensagem": "Sucesso", "dados": { "lista": [ { { "contaOms": "contaOms", "cnpjLoja": "99999999999999", "pedidoOms": "pedidoOms", "dataPedido": "2023-11-10T00:00:00", "dataRecusa": "2023-11-10T18:10:49.103", "motivoRecusa": "SEM ESTOQUE", "codigoSku": "codigoSku", "descSku": "descSku", "quantidade": 1, "valor": 482.80 } } ], "pagina": 1, "por_Pagina": 200, "total": 1000, "paginas": 10 } } ``` -------------------------------- ### Get Product by Identifier Source: https://wakecommerce.readme.io/reference/retorna-um-produto-buscando-pelo-seu-identificador Retrieves a specific product using its identifier (SKU or variant product). The type of identifier and additional information to return can be specified. ```APIDOC ## GET /products/{identifier} ### Description Retrieves a specific product using its identifier (SKU or variant product). The type of identifier and additional information to return can be specified. ### Method GET ### Endpoint `/products/{identifier}` ### Parameters #### Path Parameters - **identifier** (string) - Required - The unique identifier for the product (SKU or variant product). - **tipoIdentificador** (string) - Optional - Specifies the type of identifier ('sku' or 'variant_product'). Defaults to 'sku'. - **camposAdicionais** (string) - Optional - A comma-separated string of additional fields to include in the response. ### Request Example ```json { "tipoIdentificador": "sku", "camposAdicionais": "description,images" } ``` ### Response #### Success Response (200) - **id** (string) - The unique ID of the product. - **sku** (string) - The Stock Keeping Unit of the product. - **name** (string) - The name of the product. - **description** (string) - The description of the product. - **images** (array) - A list of image URLs for the product. #### Response Example ```json { "id": "prod_12345", "sku": "TSHIRT-RED-L", "name": "Large Red T-Shirt", "description": "A comfortable cotton t-shirt in red, size large.", "images": [ "https://example.com/images/tshirt-red-l-front.jpg", "https://example.com/images/tshirt-red-l-back.jpg" ] } ``` ``` -------------------------------- ### Consultar Estoques API - Request Body Example Source: https://wakecommerce.readme.io/reference/consultar-estoques This JSON object represents an example request body for the Consultar Estoques API. It includes parameters for pagination, store identification, SKU details, and stock quantity filters. This helps in specifying the exact stock information to be retrieved. ```json { "pagina": 1, "contaOms": "Loja1", "cnpjLoja": "17054226000178", "codigoSkuPdv": "01.01.0001", "quantidadeMaiorQue": 0, "apenasSKUComDeflator": true } ``` -------------------------------- ### WakeCommerce Order Schema Example Source: https://wakecommerce.readme.io/reference/retorna-uma-lista-de-pedido-na-ordem-decrescente-dentro-do-limite-de-datas-passadas Example JSON structure representing an order within the WakeCommerce system. It includes details like order ID, status, dates, values, customer information, and payment details. This schema is crucial for understanding order data flow. ```json { "pedidoId": 0, "situacaoPedidoId": 0, "tipoRastreamentoPedido": "string", "transacaoId": 0, "data": "2024-10-01T18:53:24.846Z", "dataPagamento": "2024-10-01T18:53:24.846Z", "dataUltimaAtualizacao": "2024-10-01T18:53:24.846Z", "valorFrete": 0, "valorTotalPedido": 0, "valorDesconto": 0, "valorDebitoCC": 0, "cupomDesconto": "string", "marketPlacePedidoId": "string", "marketPlacePedidoSiteId": "string", "canalId": 0, "canalNome": "string", "canalOrigem": "string", "retiradaLojaId": 0, "isPedidoEvento": true, "usuario": { "usuarioId": 0, "grupoInformacaoCadastral": [ { "chave": "string", "valor": "string" } ] }, "observacao": [ { "observacao": "string", "usuario": "string", "data": "2024-10-01T18:53:24.847Z", "publica": true } ], "valorCreditoFidelidade": 0, "valido": true, "valorSubTotalSemDescontos": 0, "pedidoSplit": [ 0 ], "usuarioMasterId": 0, "metadados": [ { "chave": "string", "valor": "string" } ], "transacaoPaiId": 0, "detalhesContaCorrente": [ { "contaCorrenteId": 0, "tipoContaCorrenteId": 0, "descricaoTipoConta": "string", "valor": 0, "referencias": [ "string" ] } ], "pedidoPai": 0 } ``` -------------------------------- ### Get Faturamento Indicators (Python) Source: https://wakecommerce.readme.io/reference/dashboard This Python snippet shows how to retrieve faturamento indicators using the 'requests' library. It sends a GET request to the API endpoint with the 'accept' header. ```python import requests url = "https://api.fbits.net/dashboard/faturamento" headers = { "accept": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Get Subscriptions List (Shell) Source: https://wakecommerce.readme.io/reference/assinatura-1 This snippet demonstrates how to make a GET request to the /assinaturas endpoint using cURL to retrieve a list of subscriptions. It includes the necessary URL and headers for the request. ```shell curl --request GET \ --url https://api.fbits.net/assinaturas \ --header 'accept: application/json' ``` -------------------------------- ### Get Subscriptions List (PHP) Source: https://wakecommerce.readme.io/reference/assinatura-1 This PHP snippet demonstrates fetching subscription data using cURL. It configures a cURL request to the /assinaturas endpoint with the 'accept: application/json' header. ```php ``` -------------------------------- ### Consultar Estoques API - Response Body Example Source: https://wakecommerce.readme.io/reference/consultar-estoques This JSON object demonstrates a successful response from the Consultar Estoques API. It contains a message indicating success and a 'dados' object with a list of SKUs matching the query criteria. Each SKU entry includes details like quantity, barcodes, and integration timestamps. ```json { "mensagem": "Sucesso", "dados": { "lista": [ { "contaOms": "contaOMS", "cnpjLoja": "99999999999999", "codigoSkuPdv": "01.01.0001_003_1", "codigosBarras": ["01010001003P"], "codigoSkuVinculoEcommerce": "01.01.01.062_003_1", "idSkuEcommerce": "123456", "descricaoSku": "Blusa Síntese - Azul - P", "quantidadeSku": 10, "ajustesSku": -1, "deflatorSku": 1, "deflatorContaOms": 0, "deflatorCluster": 0, "dataHoraIntegracaoLoja": "2023-11-13T16:48:17.533", "dataHoraIntegracaoSite": "2023-11-13T16:48:17.533" } ], "pagina": 1, "por_Pagina": 100, "total": 1000, "paginas": 10 } } ``` -------------------------------- ### Product Images Source: https://wakecommerce.readme.io/reference/atualiza-parcialmente-um-produto This section describes the structure for product images, including base64 encoding, format, display options, and ordering. ```APIDOC ## Product Images Structure ### Description Defines the structure for a list of product images, including base64 encoded data, format, and display preferences. ### Endpoint N/A (Represents data structure) ### Parameters #### Request Body - **imagens** (array) - Optional - List of product images in base64 format. - **base64** (string) - Required - Product image in base64 format. - **formato** (string) - Required - Image format (JPG or PNG). - **exibirMiniatura** (boolean) - Required - Whether the image should be displayed as a thumbnail. - **estampa** (boolean) - Required - Whether the image should be displayed as a print. - **ordem** (integer) - Required - Order for image presentation. ### Response #### Success Response (200) - **images** (array) - Contains the list of product images. ``` -------------------------------- ### Product Information Source: https://wakecommerce.readme.io/reference/atualiza-parcialmente-um-produto This section details the structure of product information, including optional titles, text, visibility settings, and information types. ```APIDOC ## Product Information Structure ### Description Provides details about product information, such as titles, descriptions, visibility on the website, and the type of information. ### Endpoint N/A (Represents data structure) ### Parameters #### Request Body - **titulo** (string) - Optional - Title of the information. - **texto** (string) - Optional - Text content of the information. - **exibirSite** (boolean) - Required - Indicates if the product variant is visible on the website. - **tipoInformacao** (string) - Optional - Type of product information. Allowed values: Informacoes, Beneficios, Especificacoes, DadosTecnicos, Composicao, ModoDeUsar, Cuidados, ItensInclusos, Dicas, Video, Descricao, ValorReferente, PopUpReferente, Prescricao, TabelaDeMedidas, Spot, Sinopse, Carrinho. ### Response #### Success Response (200) - **information** (object) - Contains the product information details. ``` -------------------------------- ### Banner Presentation and Display Logic Source: https://wakecommerce.readme.io/reference/insere-um-novo-banner This section details the structure for configuring banner display, including alternative display options, display schedules, and specific presentation rules across the website, searches, and categories. ```APIDOC ## Banner Configuration Details ### Description Defines the properties and logic for displaying banners on the e-commerce site, including fallback options, scheduled display times, and visibility rules for different sections like searches and categories. ### Method N/A (This describes a data structure, not an endpoint) ### Endpoint N/A ### Parameters #### Request Body (Example Structure) - **urlBannerAlternativo** (string) - Optional - URL for an alternative banner to be displayed if the primary banner fails to load. - **textoAlternativo** (string) - Required - Alternative text title to be displayed if the banner fails to load. - **diasExibicao** (object) - Optional - Specifies the days of the week the banner should be displayed. - **todosDias** (boolean) - If true, the banner displays every day, overriding other day-specific settings. - **domingo** (boolean) - Whether to display on Sunday. - **segunda** (boolean) - Whether to display on Monday. - **terca** (boolean) - Whether to display on Tuesday. - **quarta** (boolean) - Whether to display on Wednesday. - **quinta** (boolean) - Whether to display on Thursday. - **sexta** (boolean) - Whether to display on Friday. - **sabado** (boolean) - Whether to display on Saturday. - **apresentacao** (object) - Optional - Details for the banner's presentation logic. - **exibirNoSite** (boolean) - Required - Whether the banner should be displayed across the entire site. - **exibirEmTodasBuscas** (boolean) - Required - Whether the banner should be displayed on all search results pages. - **naoExibirEmBuscas** (boolean) - Required - If true, the banner will not be displayed on any search results pages, overriding `termosBusca`. - **termosBusca** (string) - The search terms for which the banner should be displayed. - **exibirEmTodasCategorias** (boolean) - Required - If true, the banner will be displayed on all category pages, overriding `termosBusca`. - **listaHotsites** (object) - Specifies which hotsites the banner should appear on. - **exibirEmTodosHotsites** (boolean) - Optional - If true, the banner displays on all hotsites, overriding the `hotsites` list. - **hotsites** (array) - List of specific hotsites where the banner should be displayed. ### Request Example ```json { "urlBannerAlternativo": "http://example.com/fallback_banner.jpg", "textoAlternativo": "Alternative Banner Text", "diasExibicao": { "segunda": true, "terca": true, "quarta": true, "quinta": true, "sexta": true }, "apresentacao": { "exibirNoSite": true, "exibirEmTodasBuscas": false, "naoExibirEmBuscas": false, "termosBusca": "promoção", "exibirEmTodasCategorias": false, "listaHotsites": { "exibirEmTodosHotsites": false, "hotsites": [ "hotsite1", "hotsite2" ] } } } ``` ### Response #### Success Response (200) Structure similar to the request body, confirming the banner configuration has been processed. #### Response Example ```json { "message": "Banner configuration updated successfully.", "data": { "urlBannerAlternativo": "http://example.com/fallback_banner.jpg", "textoAlternativo": "Alternative Banner Text", "diasExibicao": { "segunda": true, "terca": true, "quarta": true, "quinta": true, "sexta": true }, "apresentacao": { "exibirNoSite": true, "exibirEmTodasBuscas": false, "naoExibirEmBuscas": false, "termosBusca": "promoção", "exibirEmTodasCategorias": false, "listaHotsites": { "exibirEmTodosHotsites": false, "hotsites": [ "hotsite1", "hotsite2" ] } } } } ``` ``` -------------------------------- ### Get Faturamento Indicators (Node.js) Source: https://wakecommerce.readme.io/reference/dashboard This Node.js snippet demonstrates how to fetch faturamento indicators using the 'axios' library. It constructs the GET request with the correct URL and 'accept' header. ```javascript const axios = require('axios'); const options = { method: 'GET', url: 'https://api.fbits.net/dashboard/faturamento', headers: { 'accept': 'application/json' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Hotsite Management API Source: https://wakecommerce.readme.io/reference/atualiza-os-dados-de-um-hotsite-existente This section details the structure and usage of the API for managing hotsites, including properties for title, metas, banners, contents, and status. ```APIDOC ## Hotsite Management API ### Description This API allows for the management of hotsites, enabling the configuration of titles, meta tags, banners, and content. ### Method POST (Assumed, based on the structure provided for creating/updating a hotsite) ### Endpoint /websites/wakecommerce_readme_io_reference (Assumed based on the project path) ### Parameters #### Request Body - **titulo** (string) - Optional - The title to be displayed when the Hotsite is accessed. If provided, the 'metas' array must also be sent. - **metas** (array of objects) - Optional - Meta tags and title information. Can include tags like [Nome.Hotsite] and [Fbits.NomeLoja]. - **conteudo** (string) - The content of the meta tag. - **nome** (string) - The name of the meta tag. - **httpEquiv** (string) - The http-equiv attribute for the meta tag. - **scheme** (string) - The scheme attribute for the meta tag. - **banners** (array of objects) - List of banner identifiers to be linked to the hotsite. - **bannerId** (integer) - Optional - The identifier of the banner. - **conteudos** (array of objects) - List of content identifiers to be linked to the hotsite. - **conteudoId** (integer) - Required - The identifier of the content. - **ativo** (boolean) - Optional - The status of the hotsite (active or inactive). ### Request Example ```json { "titulo": "My Awesome Hotsite", "metas": [ { "conteudo": "Description of my hotsite", "nome": "description" } ], "banners": [ { "bannerId": 123 } ], "conteudos": [ { "conteudoId": 456 } ], "ativo": true } ``` ### Response #### Success Response (200) - **resultadoOperacao** (boolean) - Indicates if the operation was successful. - **codigo** (integer) - The status code of the operation. - **mensagem** (string) - A message describing the result of the operation. #### Response Example (Success) ```json { "resultadoOperacao": true, "codigo": 0, "mensagem": "Hotsite updated successfully." } ``` #### Error Response (422) - **resultadoOperacao** (boolean) - Indicates if the operation was successful. - **codigo** (integer) - The status code of the operation. - **mensagem** (string) - A message describing the error. #### Response Example (Error 422) ```json { "resultadoOperacao": true, "codigo": 0, "mensagem": "Validation error: Title is required if metas are provided." } ``` #### Error Response (500) - **resultadoOperacao** (boolean) - Indicates if the operation was successful. - **codigo** (integer) - The status code of the operation. - **mensagem** (string) - A message describing the internal server error. #### Response Example (Error 500) ```json { "resultadoOperacao": true, "codigo": 0, "mensagem": "Internal server error occurred." } ``` ``` -------------------------------- ### Get Faturamento Indicators (cURL) Source: https://wakecommerce.readme.io/reference/dashboard This snippet shows how to make a GET request to the faturamento endpoint using cURL to retrieve billing indicators. It includes the necessary URL and headers. ```shell curl --request GET \ --url https://api.fbits.net/dashboard/faturamento \ --header 'accept: application/json' ``` -------------------------------- ### Product Attributes and Inventory Source: https://wakecommerce.readme.io/reference/atualiza-parcialmente-um-produto This section details the structure for product attributes, including name, value, and display settings, as well as inventory-related fields like stock alert quantity and maximum/minimum purchase quantities. ```APIDOC ## Product Data Structure ### Description This describes the structure for product data, including various attributes, inventory management, and categorization details. ### Parameters #### Request Body - **estoqueAlertaQtd** (integer) - Optional - Quantidade para ativar o alerta de estoque. - **atributos** (array) - Optional - Atributos do produto. - **nome** (string) - Optional - (Max Length: 100) - Define o nome do atributo. - **valor** (string) - Optional - (Max Length: 8, "0000.0000,00") - Define o valor do atributo. - **exibir** (boolean) - Optional - Define se o atributo deverá ser exibido. - **quantidadeMaximaCompraUnidade** (string) - Optional - Quantidade máxima de compra do produto variante. - **quantidadeMinimaCompraUnidade** (integer) - Optional - Quantidade mínima de compra do produto variante. - **condicao** (string) - Optional - Condição do produto variante. Allowed values: "Novo", "Usado", "Renovado", "Danificado". - **urlVideo** (string) - Optional - Url do vídeo do Produto. - **spot** (boolean) - Optional - Se o produto aparece no Spot. - **paginaProduto** (boolean) - Optional - Se o produto aparece na Url. - **marketplace** (boolean) - Optional - Se o produto aparece no Marketplace. - **somenteParceiros** (boolean) - Optional - Se o produto aparece somente nos Parceiros. - **buyBox** (boolean) - Optional - Se o produto deve ser agrupado pelo EAN. - **prazoValidade** (integer) - Optional - Prazo de validade ou consumo do produto. - **consumo** (array) - Optional - Dados de consumo de produto e se deve enviar os dias de consumo por e-mail. - **quantidadeDias** (integer) - Optional - Quantidade de Dias. - **enviarEmail** (boolean) - Optional - Enviar e-mail. - **categorias** (object) - Optional - Dados do Id da categoria principal e uma lista de categorias. - **categoriaPrincipalId** (integer) - Optional - Id da Categoria Principal. - **listaCategoriaId** (array) - Optional - Id da categoria a qual o produto deverá ser vinculado. - (integer) - Optional - Id da categoria. ### Response #### Success Response (200) - **message** (string) - Success message. #### Response Example ```json { "message": "Product updated successfully" } ``` ``` -------------------------------- ### Product Variant Management Source: https://wakecommerce.readme.io/reference/adiciona-novo-produto This section details the structure and fields required for managing product variants, including optional and mandatory parameters for stock, pricing, and attributes. ```APIDOC ## Product Variant Object ### Description Represents a specific variant of a product, including its unique attributes, pricing, dimensions, stock information, and more. ### Fields #### `trocaGratis` - **Type**: boolean - **Description**: Defines if the product variant has free returns (optional). #### `peso` - **Type**: number - **Format**: double - **Description**: Weight of the product variant in grams (g). Max Length: 8, format: "0000.0000,00" (optional). #### `altura` - **Type**: number - **Format**: double - **Description**: Height of the product variant in centimeters (cm). Max Length: 8, format: "0000.0000,00" (optional). #### `comprimento` - **Type**: number - **Format**: double - **Description**: Length of the product variant in centimeters (cm). Max Length: 8, format: "0000.0000,00" (optional). #### `largura` - **Type**: number - **Format**: double - **Description**: Width of the product variant in centimeters (cm). Max Length: 8, format: "0000.0000,00" (optional). #### `garantia` - **Type**: integer - **Format**: int32 - **Description**: Defines if the product variant has a warranty (optional). #### `isTelevendas` - **Type**: boolean - **Description**: Defines if the product variant is available for telesales (optional). #### `ean` - **Type**: string - **Description**: EAN of the product variant. Max Length: 25 (optional). #### `localizacaoEstoque` - **Type**: string - **Description**: Location of the product variant in the stock. Max Length: 255 (optional). #### `listaAtacado` - **Type**: array - **Description**: Wholesale data for the product variant (optional). - **Items**: Object - **`precoPor`** (number, double): Wholesale price per unit. Max Length: 8, format: "0000.0000,00". - **`quantidade`** (integer, int32): Quantity required for wholesale purchase. #### `estoque` - **Type**: array - **Description**: List of stock/distribution center information for the product. Required if `valido` is true (optional). - **Items**: Object - **`estoqueFisico`** (integer, int32): Physical stock count. - **`estoqueReservado`** (integer, int32): Reserved stock count. - **`centroDistribuicaoId`** (integer, int32): ID of the distribution center. - **`alertaEstoque`** (integer, int32): Stock level threshold for triggering an alert. #### `listaAtributos` - **Type**: array - **Description**: List of attributes for the product variant. - **Items**: Object - **`nome`** (string): Name of the attribute. Max Length: 100. - **`valor`** (string): Value of the attribute. Max Length: 8, format: "0000.0000,00". - **`exibir`** (string): Display setting for the attribute (e.g., "Sempre", "Nunca", "Neutro", "Desconsiderar_Regras"). ``` -------------------------------- ### Get Faturamento Indicators (Ruby) Source: https://wakecommerce.readme.io/reference/dashboard This Ruby snippet shows how to retrieve faturamento indicators using the 'httparty' gem. It makes a GET request to the specified API endpoint with the appropriate headers. ```ruby require 'httparty' response = HTTParty.get('https://api.fbits.net/dashboard/faturamento', headers: { 'accept' => 'application/json' }) puts response.body ``` -------------------------------- ### Get Subscriptions List (Node.js) Source: https://wakecommerce.readme.io/reference/assinatura-1 This Node.js snippet shows how to fetch subscription data from the API. It utilizes the 'axios' library to make a GET request to the /assinaturas endpoint, including the 'accept' header. ```javascript const axios = require('axios'); const options = { method: 'GET', url: 'https://api.fbits.net/assinaturas', headers: { 'accept': 'application/json' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Get Subscriptions List (Ruby) Source: https://wakecommerce.readme.io/reference/assinatura-1 This Ruby snippet illustrates how to retrieve subscription data using the 'httparty' gem. It makes a GET request to the /assinaturas endpoint, specifying the 'accept' header for JSON responses. ```ruby require 'httparty' response = HTTParty.get('https://api.fbits.net/assinaturas', headers: { 'accept' => 'application/json' }) puts response.body ``` -------------------------------- ### Get Faturamento Indicators (PHP) Source: https://wakecommerce.readme.io/reference/dashboard This PHP snippet illustrates how to fetch faturamento indicators using Guzzle HTTP client. It sends a GET request to the API endpoint with the 'accept' header set to 'application/json'. ```php request('GET', 'https://api.fbits.net/dashboard/faturamento', [ 'headers' => [ 'accept' => 'application/json', ], ]); echo $response->getBody(); } catch (GuzzleHttp\Exception\GuzzleException $e) { echo 'Error: ' . $e->getMessage(); } ?> ``` -------------------------------- ### Seller Endpoints Source: https://wakecommerce.readme.io/reference/documenta%C3%A7%C3%A3o Endpoints for managing sellers. ```APIDOC ## POST /sellers/incluir-vendedores ### Description Endpoint público para inclusão ou atualização de vendedores no Wake OMS. ### Method POST ### Endpoint /sellers/incluir-vendedores ### Parameters #### Request Body - **sellerId** (string) - Required - The ID of the seller. - **name** (string) - Required - The name of the seller. - **email** (string) - Optional - The email of the seller. ### Request Example ```json { "sellerId": "seller_123", "name": "Example Seller", "email": "seller@example.com" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Seller included or updated successfully." } ``` ``` -------------------------------- ### Consultar Pedidos com Ruptura Source: https://wakecommerce.readme.io/reference/consultar-pedidos-com-ruptura Endpoint público com paginação para consulta dos pedidos com ruptura no Wake OMS. ```APIDOC ## GET /pedidos/ruptura ### Description Endpoint público com paginação para consulta dos pedidos com ruptura no Wake OMS. ### Method GET ### Endpoint /pedidos/ruptura ### Parameters #### Query Parameters - **page** (integer) - Optional - Número da página a ser consultada. - **size** (integer) - Optional - Quantidade de itens por página. ### Response #### Success Response (200) - **lista** (Array) - Lista de Pedidos com ruptura. - **pedido** (String) - Código do pedido. - **statusAtual** (String) - Ultimo status do pedido. - **dataStatusAtual** (DateTime) - Data do último status do pedido. - **cliente** (String) - Nome do cliente do pedido. - **ufCliente** (String) - Estado do endereço do cliente. - **dataPedido** (DateTime) - Data do pedido original - **dataEntregaPrevista** (DateTime) - Data de previsão de entrega do pedido original. - **dataEntregaReal** (DateTime) - Data de entrega do pedido ao cliente (estará nulo caso ainda não foi entregue). - **diasEntregaPrevista** (Integer) - Quantidade de dias de diferença entre o dia em que o pedido foi feito e o dia previsto em que o pedido será entregue. - **diasEntregaReal** (Integer) - Quantidade de dias de diferença entre o dia em que o pedido foi feito e o dia em que o pedido foi entregue (estará nulo caso ainda não foi entregue). - **diasAtrasoPrevisto** (Integer) - Quantidade de dias de diferença entre o pedido original e o ultimo pedido. - **quantidade** (Integer) - Quantidade de itens do pedido original. - **valorOriginal** (Double) - Valor do pedido original. - **valorRemocao** (Double) - Valor dos descontos dos pedidos na plataforma OMS. - **valorLiquido** (Double) - Valor original do pedido - valorRemocao. - **freteBruto** (Double) - Frete bruto do pedido original. - **freteLiquido** (Double) - Frete líquido do pedido original. - **diferencaFretePrevisto** (Double) - Valor de diferença de frete entre o pedido original e o último pedido. - **quantidadeChangesEfetuados** (Integer) - Quantidade de trocas de seller feitas para esse pedido. - **rupturaTotal** (Boolean) - Indica se o último pedido do "change seller" foi cancelado e o pedido não será atendido por nenhuma loja. - **informacoesChangeSeller** (Array) - Lista dados do Change Seller. - **origem** (Integer) - Ordem do pedido na linha do tempo. #### Response Example { "lista": [ { "pedido": "PEDIDO123", "statusAtual": "PROCESSANDO", "dataStatusAtual": "2023-10-27T10:00:00Z", "cliente": "Joao Silva", "ufCliente": "SP", "dataPedido": "2023-10-25T09:00:00Z", "dataEntregaPrevista": "2023-10-30T17:00:00Z", "dataEntregaReal": null, "diasEntregaPrevista": 5, "diasEntregaReal": null, "diasAtrasoPrevisto": 0, "quantidade": 2, "valorOriginal": 150.50, "valorRemocao": 10.00, "valorLiquido": 140.50, "freteBruto": 20.00, "freteLiquido": 18.00, "diferencaFretePrevisto": 0.00, "quantidadeChangesEfetuados": 0, "rupturaTotal": false, "informacoesChangeSeller": [] } ] } ``` -------------------------------- ### GET /parceiros - Retrieve All Partners Source: https://wakecommerce.readme.io/reference/parceiro This endpoint retrieves a list of all partners. It returns an array of partner objects, each containing details such as partner ID, marketplace ID, name, pricing table ID, portfolio ID, scope type, active status, marketplace status, and origin. ```APIDOC ## GET /parceiros ### Description Retrieves a list of all partners. Returns an array of partner objects. ### Method GET ### Endpoint https://api.fbits.net/parceiros ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "curl --request GET \ \ --url https://api.fbits.net/parceiros \ \ --header 'accept: application/json'" } ``` ### Response #### Success Response (200) - **parceiroId** (integer) - The ID of the partner. - **marketPlaceId** (integer) - The ID of the marketplace the partner belongs to. - **nome** (string) - The name of the partner. - **tabelaPrecoId** (integer) - The ID of the pricing table associated with the partner. - **portfolioId** (integer) - The ID of the partner's portfolio. - **tipoEscopo** (string) - The scope type of the partner. - **ativo** (boolean) - Indicates if the partner is active. - **isMarketPlace** (boolean) - Indicates if the partner is a marketplace. - **origem** (string) - The origin of the partner. #### Response Example (200 OK) ```json { "example": [ { "parceiroId": 1, "marketPlaceId": 101, "nome": "Example Partner", "tabelaPrecoId": 1, "portfolioId": 1, "tipoEscopo": " Nacional ", "ativo": true, "isMarketPlace": true, "origem": "API" } ] } ``` #### Error Response (500 Internal Server Error) - **resultadoOperacao** (boolean) - Indicates if the operation was successful. - **codigo** (integer) - The error code. - **mensagem** (string) - The error message. #### Response Example (500 Internal Server Error) ```json { "example": { "resultadoOperacao": false, "codigo": 500, "mensagem": "Internal Server Error" } } ``` ``` -------------------------------- ### Consultar Contas Source: https://wakecommerce.readme.io/reference/consultar-contas Endpoint público com paginação para consulta das contas cadastradas no Wake OMS. Suporta um total máximo de 50 registros por página. ```APIDOC ## GET /websites/wakecommerce_readme_io_reference ### Description Endpoint público com paginação para consulta das contas cadastradas no Wake OMS. ### Method GET ### Endpoint /websites/wakecommerce_readme_io_reference ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **limit** (integer) - Optional - The maximum number of records per page (defaults to 50). ### Request Example ```json { "example": "GET /websites/wakecommerce_readme_io_reference?page=1&limit=20" } ``` ### Response #### Success Response (200) - **accounts** (array) - A list of registered accounts. - **id** (integer) - The unique identifier for the account. - **name** (string) - The name of the account. - **status** (string) - The status of the account (e.g., 'active', 'inactive'). #### Response Example ```json { "accounts": [ { "id": 1, "name": "Example Account 1", "status": "active" }, { "id": 2, "name": "Example Account 2", "status": "inactive" } ] } ``` ``` -------------------------------- ### Get All Partners API Response (200 OK) Source: https://wakecommerce.readme.io/reference/parceiro This is the expected JSON structure when the request to retrieve all partners is successful (HTTP status code 200). It returns an array of partner objects, each containing details like ID, marketplace information, name, pricing table ID, portfolio ID, scope type, status, origin, and marketplace status. ```json [ { "parceiroId": 0, "marketPlaceId": 0, "nome": "string", "tabelaPrecoId": 0, "portfolioId": 0, "tipoEscopo": "string", "ativo": true, "isMarketPlace": true, "origem": "string" } ] ``` -------------------------------- ### Define Hotsite Metadata and Content in JSON Source: https://wakecommerce.readme.io/reference/atualiza-os-dados-de-um-hotsite-existente This JSON structure defines parameters for creating or updating a hotsite. It includes fields for title, meta tags, banners, and content, along with an 'ativo' (active) status. Meta tags can leverage dynamic placeholders like [Nome.Hotsite] and [Fbits.NomeLoja]. ```JSON { "titulo": "string", "metas": [ { "conteudo": "string", "nome": "string", "httpEquiv": "string", "scheme": "string" } ], "banners": [ { "bannerId": 0 } ], "conteudos": [ { "conteudoId": 0 } ], "ativo": true } ```