### GET /documents/sales_guides/ Source: https://apidocs.cloudinvoice.net/documentacao-api/documentos/list/guias-list Retrieves a list of existing guides, including Shipping Guides and Transport Guides. Supports filtering, sorting, and searching. ```APIDOC ## GET /documents/sales_guides/ ### Description Provides a list of existing guides, including Shipping Guides and Transport Guides. Supports filtering by `document_nature`, `document_status`, and general search by `search` term. ### Method GET ### Endpoint https://api.cloudinvoice.net/documents/sales_guides/ ### Parameters #### Query Parameters - **limit** (integer) - Optional - Defines the number of documents per search. - **offset** (integer) - Optional - Indicates the starting position of the search. Returns the list of documents between offset:offset+limit. - **ordering** (string) - Optional - Defines the field and direction to use in the document search. Sortable fields: id, doc_key, document_date, document_time. To sort in descending order, use the '-' sign before the field. - **search** (string) - Optional - Defines the search term to use in the list of guides. Searched fields: Id, Document Key, Document Date. - **document_nature** (integer) - Optional - Nature of the Document. Refer to the Appendix table for more information. - **document_status** (integer) - Optional - Status of the Document. Refer to the Appendix table for more information. ### Request Example ```curl https://api.cloudinvoice.net/documents/sales_guides/ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **limit** (integer) - The number of documents returned per page. - **offset** (integer) - The starting offset for the current page of results. - **count** (integer) - The total number of documents available. - **next** (string) - URL for the next page of results, or null if there are no more pages. - **previous** (string) - URL for the previous page of results, or null if this is the first page. - **results** (array) - An array of document objects, each containing details like id, doc_key, dates, amounts, and associated document information. #### Response Example ```json { "limit": 10, "offset": 0, "count": 56, "next": "https://api.cloudinvoice.net/documents/sales_guides/?limit=10&offset=10", "previous": null, "results":[ { "id": 7029, "doc_key": "GRE A2023-1/1", "document_date": "2022-12-15", "document_time": "00:03:20.270569", "document_number": 1, "our_reference": "", "is_valued": true, "total_amount": 2.0, "total_due_amount": 0.0, "due_date": "2022-12-15", "document_nature_id": 321, "document_id": 8, "document": { "code": "GRE", "document_name": "Guia de Remessa" }, "document_serie_id": 6, "document_serie": { "code": "A2023-1", "description": "Série A2023-1" }, "document_status_id": 1202, "warehouse_id": 1, "warehouse": { "code": 1, "description": "Armazém 1" }, "document_nature": { "code": "GR", "description": "Guia de Remessa" }, "document_status": { "code": "F", "description": "Finalizado" }, "party_id": 39, "party": { "class": 1601, "code": 1023, "name": "Cliente Demo", "fiscal_number": "999999990" } } ] } ``` ### Error Handling - **401**: Unauthorized (No Response) - **400**: List of detected errors - **403**: Forbidden (No Response) ``` -------------------------------- ### Get Product Request Example (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/get This snippet shows how to make a GET request to retrieve product information from the CloudInvoice API using cURL. It includes the necessary URL and headers. ```bash curl https://api.cloudinvoice.net/products/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Get Family Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/get Example of a successful response when retrieving a product family by ID. It includes details like family ID, code, description, and other attributes. ```JSON { "id": 1, "code": "1", "description": "Familia 1 - Update", "photo_image_path": null, "button_background_color": 3, "is_disable_touch": false, "obs": "" } ``` -------------------------------- ### Get Product Alternative Code - Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/codigo-alternativo-get Provides an example of a successful JSON response when retrieving information about a product's alternative code. This includes product details, alternative code information, barcode type, and pricing. ```json { "product_id": 1, "product": { "code": "PROD1", "description": "Produto Standard 1" }, "code": "ALT1", "bar_code_type_id": 152, "bar_code_type": { "code": "F", "description": "Fornecedor" }, "description": "", "quantity": 1.0, "measure_unit_id": null, "measure_unit": null, "use_altern_code_price": false, "unit_price": 0.0, "unit_price_tax_inc": 0.0, "use_price_tax_inc": false, "tax_rate": 0.0 } ``` -------------------------------- ### Example Price Line Response Source: https://apidocs.cloudinvoice.net/documentacao-api/linhas-de-precos/get An example of a successful response when retrieving a price line, showing its details. ```JSON { "id": 1, "code": 1, "description": "Preço de Venda 1", "short_description": "P.Venda 1", "price_line_type_id": 271, "price_line_type": { "id": 271, "description1": "Preço de Venda" }, "obs": "" } ``` -------------------------------- ### Example Request for Listing Document Series Source: https://apidocs.cloudinvoice.net/documentacao-api/series-de-documentos/list Demonstrates how to make a GET request to the CloudInvoice API to fetch a list of document series using cURL. ```bash curl https://api.cloudinvoice.net/series/ \ -H "Content-Type: application/json" ``` -------------------------------- ### District Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/distritos/get Provides an example of the JSON response when successfully retrieving district information. It includes details like ID, code, description, and associated territory and country data. ```JSON { "id": 8, "code": "08", "description": "Faro", "territory_id": 101, "country_id": 1, "country": { "code": "PT", "country_name": "Portugal" }, "territory": { "code": "CO", "description": "Continente" } } ``` -------------------------------- ### List Suppliers Request Example (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/fornecedores/list Example of how to make a request to list suppliers using cURL. ```shell curl https://api.cloudinvoice.net/suppliers/ -H "Content-Type: application/json" ``` -------------------------------- ### CloudInvoice API Response Example Source: https://apidocs.cloudinvoice.net/conta-autenticacao/info-do-user An example JSON response from the CloudInvoice API, showing user and company details. This structure is typical for authenticated requests. ```json { "updated_at": 1613150982, "version": "1.0.0", "version_date": "2021-01-08", "today_str": "2021-02-12", "created": "2021-02-03T18:34:55.548535Z", "key": "16511f6558a00e3273d8b4882b9d9ccdc57cbe4d", "user": { "id": 1, "first_name": "Sample", "last_name": "User", "full_name": "Sample User", "is_active": true, "is_staff": false, ... }, "company": { "id": 1, "code": "demo_company", ... }, ... } ``` -------------------------------- ### Get Product by ID Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/get Retrieves a specific product by its ID. ```APIDOC ## GET /products/:id/ ### Description Retrieves a product using its unique identifier. ### Method GET ### Endpoint https://api.cloudinvoice.net/products/:id/ #### Path Parameters - **id** (integer) - Required - The ID of the product you want to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the product. - **code** (string) - The product code. - **description** (string) - A detailed description of the product. - **short_description** (string) - A shorter description of the product. - **family_id** (integer) - The ID of the product's family. - **family** (object) - Information about the product's family. - **sub_family_id** (integer|null) - The ID of the product's sub-family. - **sub_family** (object|null) - Information about the product's sub-family. - **product_type_id** (integer) - The ID of the product type. - **product_type** (object) - Information about the product type. - **product_category_id** (integer) - The ID of the product category. - **product_category** (object) - Information about the product category. - **product_type_saft_id** (integer) - The ID for SAFT product type. - **product_type_saft** (object) - Information about the SAFT product type. - **vat_tax_id** (integer) - The ID of the VAT tax applied to the product. - **vat_tax** (object) - Information about the VAT tax. - **vat_tax_rate** (float) - The VAT tax rate. - **bar_code** (string) - The product's barcode. - **bar_code_type_id** (integer) - The ID of the barcode type. - **bar_code_type** (object) - Information about the barcode type. - **do_stock_management** (boolean) - Indicates if stock management is enabled for the product. - **can_have_negative_stock** (boolean) - Indicates if negative stock is allowed for the product. - **physical_qty** (float) - The physical quantity of the product in stock. - **measure_unit_id** (integer) - The ID of the measure unit. - **measure_unit** (object) - Information about the measure unit. - **use_serial_number** (boolean) - Indicates if serial numbers are used for the product. - **use_internal_serial_number** (boolean) - Indicates if internal serial numbers are used. - **has_lots** (boolean) - Indicates if the product is managed by lots. - **use_sizes_colors** (boolean) - Indicates if sizes and colors are used for the product. - **last_cost_price** (float) - The last cost price of the product. - **average_cost_price** (float) - The average cost price of the product. - **profit_margin** (float) - The profit margin for the product. - **unit_price** (float) - The unit price of the product. - **unit_price_tax_inc** (float) - The unit price including tax. #### Response Example ```json { "id": 1, "code": "PROD1", "description": "Produto Standard 1", "short_description": "Produto Standard 1", "family_id": 1, "family": { "code": "FAM1", "description": "Família 1" }, "sub_family_id": null, "sub_family": null, "product_type_id": 131, "product_type": { "code": "01", "description": "Produto" }, "product_category_id": 211, "product_category": { "code": "M", "description": "Mercadorias" }, "product_type_saft_id": 3271, "product_type_saft": { "code": "P", "description": "Produtos" }, "vat_tax_id": 1, "vat_tax": { "code": 1, "description": "Taxa Normal" }, "vat_tax_rate": 23.0, "bar_code": "2000000000015", "bar_code_type_id": 153, "bar_code_type": { "code": "I", "description": "Interno EAN13" }, "do_stock_management": true, "can_have_negative_stock": true, "physical_qty": 10.0, "measure_unit_id": 1, "measure_unit": { "code": "UNI", "description": "Unidade" }, "use_serial_number": false, "use_internal_serial_number": false, "has_lots": false, "use_sizes_colors": false, "last_cost_price": 0.0, "average_cost_price": 0.0, "profit_margin": 0.0, "unit_price": 100.0, "unit_price_tax_inc": 123.0 } ``` #### Error Responses - **400 Bad Request**: If there are validation errors. - **401 Unauthorized**: If authentication fails. - **403 Forbidden**: If the user does not have permission. - **404 Not Found**: If no product with the specified ID exists. ``` -------------------------------- ### List Sub-Families Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/sub-familias/list An example of a successful response when listing sub-families from the CloudInvoice API. It includes pagination details and a list of sub-family objects. ```JSON { "limit": 10, "offset": 0, "count": 47, "next": "https://api.cloudinvoice.net/sub_families/?limit=10&offset=10", "previous": null, "results": [ { "id": 1, "code": "1", "description": "Sub-Familia 1", "photo_image_path": null, "button_background_color": 3, "is_disable_touch": false, "obs": "", "family_id": 1, "family": { "code": "P1", "description": "Famílía 1" } }, ... ] } ``` -------------------------------- ### List Families Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/list Example of a successful response when listing families from the CloudInvoice API. It includes pagination details and a list of family objects. ```json { "limit": 10, "offset": 0, "count": 37, "next": "https://api.cloudinvoice.net/families/?limit=10&offset=10", "previous": null, "results": [ { "id": 1, "code": "1", "description": "Familia 1", "photo_image_path": null, "button_background_color": 3, "is_disable_touch": false, "obs": "" }, ... ] } ``` -------------------------------- ### Demo Plan Response Example Source: https://apidocs.cloudinvoice.net/conta-autenticacao/planos-demo An example JSON response from the CloudInvoice API's demo plan endpoint, detailing the structure of plan information returned. ```json [ { "id": 1, "code": "INDIVIDUAL", "description": "Plano Individual" }, { "id": 2, "code": "SERVICES", "description": "Plano Facturação de Serviços" }, { "id": 3, "code": "RETAIL", "description": "Plano Gestão de Loja" }, { "id": 4, "code": "BUSINESS", "description": "Plano Gestão Comercial" } ] ``` -------------------------------- ### Get Document Request Example (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/documentos/get Example of how to request a document by its ID using cURL. It specifies the endpoint and includes a header for content type. ```curl curl https://api.cloudinvoice.net/documents/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Get Country by ID - cURL Example Source: https://apidocs.cloudinvoice.net/documentacao-api/paises/get Example of how to retrieve a country's details using the CloudInvoice API via a cURL request. It specifies the endpoint and includes a header for content type. ```cURL curl https://api.cloudinvoice.net/countries/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Example Response for Get Series Source: https://apidocs.cloudinvoice.net/documentacao-api/series-de-documentos/get An example JSON response when successfully retrieving a document series by its ID. It includes the series' ID, code, description, dates, and related location and document type information. ```json { "id": 3, "code": "A02", "description": "Série A02", "is_default_serie": false, "initial_date": "2023-01-03 11:58:00", "expiration_date": null, "is_closed": false, "closed_date": null, "closed_reason": "", "closed_user_id": null, "is_cash_vat_scheme": false, "is_self_billing": false, "is_at_cud_serie": true, "is_offline_serie": false, "document_serie_type_id": 901, "document_serie_type": { "code": "P", "description": "Documentos Produzidos na Aplicação" }, "location_id": 1, "location": { "code": 1, "description": "Localização 1" } } ``` -------------------------------- ### API Response Example (JSON) Source: https://apidocs.cloudinvoice.net/documentacao-api/documentos/list/outros-documentos-list Estrutura de exemplo para a resposta da API ao listar documentos de trabalho. Inclui metadados de paginação e uma lista de documentos com detalhes. ```json { "limit": 10, "offset": 0, "count": 56, "next": "https://api.cloudinvoice.net/documents/working_documents/?limit=10&offset=10", "previous": null, "results":[ { "id": 7281, "doc_key": "ORC A2023-1/3", "document_date": "2022-12-19", "document_time": "17:45:58.955479", "document_number": 3, "our_reference": "", "is_valued": true, "total_amount": 2.46, "total_due_amount": 0.0, "due_date": "2022-12-19", "document_nature_id": 353, "document_id": 20, "document": { "code": "ORC", "document_name": "Orçamento" }, "document_serie_id": 6, "document_serie": { "code": "A2023-1", "description": "Série A2023-1" }, "document_status_id": 1202, "warehouse_id": 1, "warehouse": { "code": 1, "description": "Armazém 1" }, "document_nature": { "code": "OR", "description": "Orçamento" }, "document_status": { "code": "F", "description": "Finalizado" }, "party_id": 9, "party": { "class": 1601, "code": 9, "name": "Cliente Demo", "fiscal_number": "999999990" } }, ... ] } ``` -------------------------------- ### Get Country by ID - Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/paises/get Example of a successful JSON response from the CloudInvoice API when retrieving country details. It includes fields like ID, country code, name, EU status, and search order. ```JSON { "id": 1, "code": "PT", "country_name": "Portugal", "is_eu": true, "search_order": 1 } ``` -------------------------------- ### Example Request: Create Product Family Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/create Demonstrates how to make a POST request to create a product family using cURL, including the necessary request body parameters. ```curl curl -X POST https://api.cloudinvoice.net/families/new/ -d '{ "code": "1", "description": "Família 1" }' ``` -------------------------------- ### List Sales Prices - Example Request (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/precos-de-venda-list Example of how to request the list of sales prices using cURL. This command fetches general product sales price information from the API. ```bash curl https://api.cloudinvoice.net/products/prices/ \ -H "Content-Type: application/json" ``` -------------------------------- ### Example Response: Create Product Family Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/create Shows a successful response after creating a product family, including the assigned ID and all details of the newly created family. ```json { "id": 1, "code": "1", "description": "Familia 1", "photo_image_path": null, "button_background_color": 3, "is_disable_touch": false, "obs": "" } ``` -------------------------------- ### Get Payment Method Request (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/metodos-de-pagamento/get Example of how to make a GET request to retrieve a specific payment method using its ID via cURL. It includes headers for content type. ```curl curl https://api.cloudinvoice.net/payment_methods/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Example Document Line JSON Source: https://apidocs.cloudinvoice.net/documentacao-api/documentos/apendice This JSON object demonstrates the structure and expected values for a single line item within a CloudInvoice document. It includes product code, description, quantity, unit value, and discounts. ```json { "code": "PROD1", "description": "Produto 1", "base_qty": 1, "line_unit_value": 100, "line_discount1": 10, "line_discount2": 5 } ``` -------------------------------- ### Example Response for Listing Document Series Source: https://apidocs.cloudinvoice.net/documentacao-api/series-de-documentos/list Provides an example JSON structure for the response when listing document series. It includes pagination details and a list of document series objects, each with its ID, code, description, and other relevant properties. ```json { "limit": 10, "offset": 0, "count": 4, "next": null, "previous": null, "results": [ { "id": 1, "code": "A01", "description": "Série A01", "is_default_serie": false, "initial_date": null, "expiration_date": "2999-12-31T23:59:00Z", "is_closed": true, "document_serie_type_id": 901, "document_serie_type": { "code": "P", "description": "Documentos Produzidos na Aplicação" }, "location_id": 1, "location": { "code": 1, "description": "Localização 1" } }, { "id": 3, "code": "A02", "description": "Série A02", "is_default_serie": false, "initial_date": "2023-01-03T11:58:00Z", "expiration_date": null, "is_closed": false, "document_serie_type_id": 901, "document_serie_type": { "code": "P", "description": "Documentos Produzidos na Aplicação" }, "location_id": 1, "location": { "code": 1, "description": "Localização 1" } }, ... ] } ``` -------------------------------- ### Get Product Sale Price Response (JSON) Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/precos-de-venda-get Example JSON response for a successful request to get product sale price information. It includes product details, price line information, unit price, and tax details. ```json { "product_id": 1, "product": { "code": "PROD1", "description": "Produto Standard 1" }, "price_line_id": 1, "price_line": { "code": 1, "description": "Preço de Venda 1" }, "unit_price": 100.0, "unit_price_tax_inc": 123.0, "use_price_tax_inc": true, "tax_rate": 23.0 } ``` -------------------------------- ### Create Product Family Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/create Creates a new product family with specified details like code, description, and optional settings such as button color and POS visibility. It returns the newly created family's data upon success or error details. ```http POST https://api.cloudinvoice.net/families/new/ ``` ```json { "code": "string", "description": "string", "button_background_color": "integer", "obs": "string", "is_disable_touch": "boolean" } ``` -------------------------------- ### Get Payment Method Response (JSON) Source: https://apidocs.cloudinvoice.net/documentacao-api/metodos-de-pagamento/get Example of a successful JSON response when retrieving a payment method. It details the structure and fields returned for a payment method. ```json { "id": 1, "code": 1, "description": "Dinheiro", "where_to_use_id": 58, "where_to_use": { "id": 58, "description1": "Ambos" }, "payment_mechanism_id": 61, "payment_mechanism": { "id": 61, "description1": "Numerário" }, "does_add_to_till": true, "obs": "" } ``` -------------------------------- ### List Sales Prices - Example Response Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/precos-de-venda-list Example of a successful response when listing sales prices. It includes pagination details and a list of products with their respective sales prices and tax information. ```json { "limit": 10, "offset": 0, "count": 28, "next": "https://api.cloudinvoice.net/products/prices/?limit=10&offset=10", "previous": null, "results": [ { "product_id": 1, "product": { "code": "PROD1", "description": "Produto Standard 1" }, "price_line_id": 1, "price_line": { "code": 1, "description": "Preço de Venda 1" }, "unit_price": 100.0, "unit_price_tax_inc": 123.0, "use_price_tax_inc": true, "tax_id": 1, "tax": { "code": 1, "description": "Taxa Normal", "tax_rate": 23.0 } }, ... ] } ``` -------------------------------- ### Get Family by ID (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/familias/get Retrieves a specific product family by its ID using a cURL request. This example demonstrates how to construct the request with the necessary headers and URL. ```cURL curl https://api.cloudinvoice.net/families/1/ -H "Content-Type: application/json" ``` -------------------------------- ### List Sales Guides using Curl Source: https://apidocs.cloudinvoice.net/documentacao-api/documentos/list/guias-list Demonstrates how to retrieve a list of sales guides from the CloudInvoice API using a cURL request. It includes headers for content type and shows a typical JSON response structure with document details. ```bash curl https://api.cloudinvoice.net/documents/sales_guides/ -H "Content-Type: application/json" ``` ```json { "limit": 10, "offset": 0, "count": 56, "next": "https://api.cloudinvoice.net/documents/sales_guides/?limit=10&offset=10", "previous": null, "results":[ { "id": 7029, "doc_key": "GRE A2023-1/1", "document_date": "2022-12-15", "document_time": "00:03:20.270569", "document_number": 1, "our_reference": "", "is_valued": true, "total_amount": 2.0, "total_due_amount": 0.0, "due_date": "2022-12-15", "document_nature_id": 321, "document_id": 8, "document": { "code": "GRE", "document_name": "Guia de Remessa" }, "document_serie_id": 6, "document_serie": { "code": "A2023-1", "description": "Série A2023-1" }, "document_status_id": 1202, "warehouse_id": 1, "warehouse": { "code": 1, "description": "Armazém 1" }, "document_nature": { "code": "GR", "description": "Guia de Remessa" }, "document_status": { "code": "F", "description": "Finalizado" }, "party_id": 39, "party": { "class": 1601, "code": 1023, "name": "Cliente Demo", "fiscal_number": "999999990" } }, ... ] } ``` -------------------------------- ### GET /auth/demo_plan/ Source: https://apidocs.cloudinvoice.net/conta-autenticacao/planos-demo Retrieves a list of available demonstration plans. This endpoint does not require authentication. ```APIDOC ## GET /auth/demo_plan/ ### Description Lists available demonstration plans. ### Method GET ### Endpoint https://api.cloudinvoice.net/auth/demo_plan/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```curl curl https://api.cloudinvoice.net/auth/demo_plan/ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the plan. - **code** (string) - The code representing the plan (e.g., "INDIVIDUAL"). - **description** (string) - A description of the plan (e.g., "Plano Individual"). #### Response Example ```json [ { "id": 1, "code": "INDIVIDUAL", "description": "Plano Individual" }, { "id": 2, "code": "SERVICES", "description": "Plano Facturação de Serviços" }, { "id": 3, "code": "RETAIL", "description": "Plano Gestão de Loja" }, { "id": 4, "code": "BUSINESS", "description": "Plano Gestão Comercial" } ] ``` ``` -------------------------------- ### Get Tax Exemption Details (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/motivos-de-isencao/get Example of how to retrieve a specific tax exemption reason using its ID via a cURL request. It specifies the API endpoint and the Content-Type header. ```shell curl https://api.cloudinvoice.net/tax_exemptions/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Exemplo de Resposta da API para Stock por Armazém Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/stocks-por-armazem-get Estrutura de resposta esperada ao consultar o stock de um produto por armazém. Inclui informações de paginação e uma lista de resultados com detalhes do stock em cada armazém. ```json { "limit": 10, "offset": 0, "count": 37, "next": "https://api.cloudinvoice.net/products/1/stocks_per_warehouse/?limit=10&offset=10", "previous": null, "results": [ { "product_id": 1, "warehouse_id": 1, "location_id": 1, "physical_qty": 7.0, "cust_ordered_qty": 0.0, "available_qty": 7.0 }, { "product_id": 1, "warehouse_id": 2, "location_id": 2, "physical_qty": 3.0, "cust_ordered_qty": 1.0, "available_qty": 2.0 }, ... ] } ``` -------------------------------- ### List Localities Request Example (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/concelhos/list Example of how to make a GET request to the /localities/ endpoint using cURL to retrieve a list of localities. It specifies the API endpoint and includes a header for content type. ```curl curl https://api.cloudinvoice.net/localities/ -H "Content-Type: application/json" ``` -------------------------------- ### Get Tax Table by ID (cURL Example) Source: https://apidocs.cloudinvoice.net/documentacao-api/taxas/get Demonstrates how to fetch a specific tax table entry using its ID via a cURL request. It includes setting the content type to JSON. ```shell curl https://api.cloudinvoice.net/tax_tables/1/ -H "Content-Type: application/json" ``` -------------------------------- ### List Tax Tables GET Request (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/taxas/list Example of how to make a GET request to the tax_tables endpoint using cURL. This request retrieves a list of tax tables and requires a Content-Type header. ```Bash curl https://api.cloudinvoice.net/tax_tables/ \ -H "Content-Type: application/json" ``` -------------------------------- ### Exemplo de Endpoint da CloudInvoice API Source: https://apidocs.cloudinvoice.net/introducao/comecar-a-utilizar Este snippet mostra um exemplo de um endpoint base para aceder aos clientes na CloudInvoice API. É utilizado para iniciar a interação com a API. ```plaintext https://api.cloudinvoice.net/customers/ ``` -------------------------------- ### Get Product Sale Price Request (cURL) Source: https://apidocs.cloudinvoice.net/documentacao-api/produtos/precos-de-venda-get Example cURL request to retrieve the sale price of a product for a specific price line. Requires the product ID and price line ID in the URL. ```curl curl https://api.cloudinvoice.net/products/1/prices/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Create Locality Response Example Source: https://apidocs.cloudinvoice.net/documentacao-api/concelhos/create An example of a successful response when creating a new locality. It includes the newly created locality's ID, code, description, district ID, and associated district information. ```json { "id": 311, "code": "C1", "description": "Concelho #1", "zip_code": "", "district_id": 8, "district": { "code": "08", "description": "Faro" } } ``` -------------------------------- ### Example Request to Get Supplier Source: https://apidocs.cloudinvoice.net/documentacao-api/fornecedores/get Demonstrates how to make a request to the CloudInvoice API to fetch supplier details using curl. It specifies the API endpoint and sets the Content-Type header to application/json. ```curl curl https://api.cloudinvoice.net/suppliers/1/ -H "Content-Type: application/json" ``` -------------------------------- ### Example API Request to List Customers Source: https://apidocs.cloudinvoice.net/documentacao-api/clientes/list An example of how to make a request to the CloudInvoice API to list customers using cURL. It demonstrates setting the content type header for the request. ```curl curl https://api.cloudinvoice.net/customers/ -H "Content-Type: application/json" ```