### Example: Get Cost Centers (curl) Source: https://developers.contaazul.com/guide/openapi/centro-de-custo A `curl` command example to retrieve cost centers from the mock server, demonstrating how to include query parameters and the Authorization header. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/centro-de-custo?busca=string&campo_ordenado_ascendente=string&campo_ordenado_descendente=string&filtro_rapido=ATIVO&pagina=0&tamanho_pagina=0' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example: Get Products by Filter Source: https://developers.contaazul.com/guide/openapi/produto/deactivateproducts A cURL command example demonstrating how to make a GET request to the 'Get Products by Filter' endpoint. It includes query parameters for filtering and an Authorization header for authentication, targeting the mock server. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/produto/busca?busca=string&campo_ordenacao=NOME&direcao_ordenacao=ASC&fim=100.5&inicio=10.5&pagina=1&status=ATIVO&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example: Get Person Summary by ID Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas Demonstrates how to retrieve a person's summary by ID using cURL, including the GET method, URL with an example ID, and authorization header. ```curl curl -i -X GET \ https://developers.contaazul.com/_mock/openapi/v1/pessoa/123e4567-e89b-12d3-a456-426614174000/resumo \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example: Get Person Registration Summary by ID Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas/paths/~1v1~1pessoa~1ativacao/post Provides a cURL command example for making a GET request to retrieve a person's registration summary by ID. It includes the authorization header and an example ID in the path. ```curl curl -i -X GET \ https://developers.contaazul.com/_mock/openapi/v1/pessoa/123e4567-e89b-12d3-a456-426614174000/resumo \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Code Example: Obter produtos por filtro (GET /v1/produto/busca) with cURL Source: https://developers.contaazul.com/guide/openapi/produto/paths/~1v1~1produto~1busca/get An illustrative code snippet demonstrating how to call the 'Obter produtos por filtro' API endpoint using cURL. This example shows how to construct the GET request with query parameters and includes authorization. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/produto/busca?busca=string&campo_ordenacao=NOME&direcao_ordenacao=ASC&fim=100.5&inicio=10.5&pagina=1&status=ATIVO&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example: Get Sales Items with Pagination Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda~1busca/get Example cURL command to retrieve sales items from the mock server. It demonstrates how to include pagination parameters and an authorization header for authentication. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id_venda}/itens?pagina=1&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Example JSON Response for Baixa Resource Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-receber/post Provides a concrete example of the JSON structure returned by the API when retrieving a 'Baixa' resource, illustrating typical values for its properties. ```JSON { "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "versao": 1, "data_pagamento": "2023-10-01", "composicao_valor": { "multa": 0, "juros": 0, "valor_bruto": 1000, "desconto": 0, "taxa": 0 }, "conta_financeira": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "metodo_pagamento": "CARTAO_CREDITO", "observacao": "Payment for invoice #1234", "nsu": "1234567890" } ``` -------------------------------- ### Create Sale (POST /v1/venda) cURL Example Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda~1busca/get An example cURL command demonstrating how to make a POST request to the `/v1/venda` endpoint with a sample JSON payload to create a new sale. This example uses the mock server URL and requires an Authorization Bearer token. ```curl curl -i -X POST \ https://developers.contaazul.com/_mock/openapi/v1/venda \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "id_cliente": "2887ff7c-e8dc-4cd4-bd04-a5554a71c2de", "numero": 0, "situacao": "EM_ANDAMENTO", "data_venda": "2019-08-24", "id_categoria": "28aae0b9-0a40-4479-baff-3cbc83721b20", "id_centro_custo": "51474982-bf91-4e21-81d5-2212e04a543c", "observacoes": "string", "observacoes_pagamento": "string", "itens": [ { "descricao": "Produto A", "quantidade": 2, "valor": 50, "id": "550e8400-e29b-41d4-a716-446655440000", "valor_custo": 40 } ], "composicao_de_valor": { "frete": 100, "desconto": { "tipo": "PORCENTAGEM", "valor": 5 } }, "condicao_pagamento": { "tipo_pagamento": "CARTAO_CREDITO", "id_conta_financeira": "550e8400-e29b-41d4-a716-446655440000", "opcao_condicao_pagamento": "À vista", "nsu": "1234567890", "parcelas": [ { "data_vencimento": "2023-12-31", "valor": 100, "descricao": "Parcela 1" } ] } }' ``` -------------------------------- ### Example: Retrieve Sales Items with cURL Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda/post A cURL command example demonstrating how to make a GET request to the sales items endpoint, including pagination parameters and an authorization header placeholder. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id_venda}/itens?pagina=1&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example for Creating a Sale Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda~1exclusao-lote/post An example cURL command demonstrating how to make a POST request to the ContaAzul API to create a new sale, including authentication and a sample JSON payload. ```curl curl -i -X POST \ https://developers.contaazul.com/_mock/openapi/v1/venda \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "id_cliente": "2887ff7c-e8dc-4cd4-bd04-a5554a71c2de", "numero": 0, "situacao": "EM_ANDAMENTO", "data_venda": "2019-08-24", "id_categoria": "28aae0b9-0a40-4479-baff-3cbc83721b20", "id_centro_custo": "51474982-bf91-4e21-81d5-2212e04a543c", "observacoes": "string", "observacoes_pagamento": "string", "itens": [ { "descricao": "Produto A", "quantidade": 2, "valor": 50, "id": "550e8400-e29b-41d4-a716-446655440000", "valor_custo": 40 } ], "composicao_de_valor": { "frete": 100, "desconto": { "tipo": "PORCENTAGEM", "valor": 5 } }, "condicao_pagamento": { "tipo_pagamento": "CARTAO_CREDITO", "id_conta_financeira": "550e8400-e29b-41d4-a716-446655440000", "opcao_condicao_pagamento": "À vista", "nsu": "1234567890", "parcelas": [ { "data_vencimento": "2023-12-31", "valor": 100, "descricao": "Parcela 1" } ] } }' ``` -------------------------------- ### cURL Example: Get Financial Accounts Source: https://developers.contaazul.com/guide/openapi/conta-financeira Example cURL command to retrieve financial accounts from the mock server. This command demonstrates how to include query parameters for filtering and how to pass the authorization token. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/conta-financeira?apenas_ativo=true&esconde_conta_digital=true&mostrar_caixinha=true&nome=string&pagina=1&tamanho_pagina=10&tipos=APLICACAO' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### JSON Example: Successful Person Update Response Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas An example JSON payload demonstrating the structure and typical values returned upon a successful person update operation. ```json { "uuid": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "perfis": [ { … } ], "registros": [ { … } ], "outros_contatos": [ { … } ], "enderecos": [ { … } ], "tipo_pessoa": "FISICA", "cnpj": "33111512000184", "cpf": "12345678900", "nome": "John Doe", "codigo": "123", "ativo": true, "optante_simples": true, "agencia_publica": true, "nome_fantasia": "Company name", "registro_geral": "12345678901", "data_nascimento": "2022-01-01", "email": "email@email.com", "telefone_comercial": "12345678901", "celular": "12345678901", "observacao": "Observation", "id_contato_principal": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "criado_em": "2022-01-01", "excluido_em": "2022-01-01", "origem": "Origin", "id_origem": "35473eec-4e74-11ee-b500-9f61de8a8b8b" } ``` -------------------------------- ### cURL Example: Retrieve Sales Items Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda~1exclusao-lote/post A cURL command example demonstrating how to make a GET request to the sales items API endpoint. It includes the mock server URL, pagination query parameters, and a placeholder for the OAuth2 Authorization Bearer token. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id_venda}/itens?pagina=1&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example for Retrieving a Financial Entry (Baixa) Source: https://developers.contaazul.com/guide/openapi/financeiro Demonstrates how to make a GET request using cURL to retrieve a specific financial entry (baixa). It includes the full URL with a placeholder for the ID and shows how to pass the authorization token. ```curl curl -i -X GET \ https://developers.contaazul.com/_mock/openapi/v1/financeiro/eventos-financeiros/parcelas/baixa/35473eec-4e74-11ee-b500-9f61de8a8b8b \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Get Products by Filter - Conta Azul Pro API Source: https://developers.contaazul.com/guide/openapi/produto/paths/~1v1~1produto/post Documents the API endpoint for retrieving products with various filtering and pagination options. It details request parameters, security requirements, and the expected response structure, including a curl example for demonstration. ```APIDOC Endpoint: GET /v1/produto/busca Request: Security: oAuth2 Query Parameters: - pagina: Type: integer Default: 1 - tamanho_pagina: Type: integer Default: 10 - campo_ordenacao: Type: string Default: "NOME" Enum: ["NOME", "CODIGO", "VALOR_VENDA", "ESTOQUE"] - direcao_ordenacao: Type: string Description: Direção da ordenação (ASC para ascendente, DESC para descendente). Default: "ASC" Enum: ["ASC", "DESC"] - busca: Type: string Description: Buscar produtos por nome ou código. - status: Type: string Default: "TODOS" Enum: ["ATIVO", "INATIVO", "TODOS"] - inicio: Type: number Example: 10.5 - fim: Type: number Example: 100.5 Servers: - Mock server: https://developers.contaazul.com/_mock/openapi/v1/produto/busca - Production server: https://api-v2.contaazul.com/v1/produto/busca Responses: - 200: Description: Resposta bem-sucedida Content: application/json: Schema: type: object properties: itens: type: array description: Array of objects items: {} itens_totais: type: integer example: 1 Example: { "itens": [ { /* ... */ } ], "itens_totais": 1 } ``` ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/produto/busca?busca=string&campo_ordenacao=NOME&direcao_ordenacao=ASC&fim=100.5&inicio=10.5&pagina=1&status=ATIVO&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Conta Azul Pro API Servers Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-pagar/post Lists the available server environments for the Conta Azul Pro API, including a mock server for testing and the production server for live operations. ```APIDOC Servers: Mock server: https://developers.contaazul.com/_mock/openapi/ Production server: https://api-v2.contaazul.com/ ``` -------------------------------- ### Example JSON Response for Financial Entry (Baixa) Source: https://developers.contaazul.com/guide/openapi/financeiro Provides a concrete JSON example of a successful response for a financial entry, illustrating typical data and values for each field as defined in the API schema. ```JSON { "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "versao": 1, "data_pagamento": "2023-10-01", "composicao_valor": { "multa": 0, "juros": 0, "valor_bruto": 1000, "desconto": 0, "taxa": 0 }, "conta_financeira": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "metodo_pagamento": "CARTAO_CREDITO", "observacao": "Payment for invoice #1234", "nsu": "1234567890" } ``` -------------------------------- ### Example JSON Response Body for Update Financial Event Installment Source: https://developers.contaazul.com/guide/openapi/financeiro This JSON object represents a successful response body after updating a financial event installment, showing the structure and example values of the updated resource. ```json { "nota": "Nota da parcela", "descricao": "Descrição da parcela", "vencimento": "2024-07-15", "composicao_valor": { "multa": 100.25, "juros": 1.5, "valor_bruto": 275.99, "valor_liquido": 250.33, "desconto": 2.1, "taxa": 4.4 }, "versao": 1, "data_pagamento_esperado": "2024-07-15", "metodo_pagamento": "CARTAO_CREDITO", "perda": { "data": "2024-07-15", "valor": 1.99 }, "nsu": 1029384756, "pagamento_agendado": false, "conta_financeira": { "id": "6bac0a7f-0422-48a9-86ea-0b1f0a6f9db9", "versao": 1, "nome": "Nome do banco", "agencia": 1, "numero": 123, "tipo": "OUTROS", "banco": "OUTROS" } } ``` -------------------------------- ### cURL Example: Get Financial Event Parcels Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-pagar/post Provides a cURL command example to call the API endpoint for retrieving financial event parcels. It demonstrates how to construct the GET request with the necessary Authorization header. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/financeiro/eventos-financeiros/{id_evento}/parcelas' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Example: Create New Cost Center (curl) Source: https://developers.contaazul.com/guide/openapi/centro-de-custo A `curl` command example to create a new cost center on the mock server, demonstrating how to include the JSON request body and the Authorization header. ```curl curl -i -X POST \ https://developers.contaazul.com/_mock/openapi/v1/centro-de-custo \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "codigo": "codigo_inserido_pelo_usuario", "nome": "Centro de custo do Robinho" }' ``` -------------------------------- ### cURL Example: Update Financial Event Installment Source: https://developers.contaazul.com/guide/openapi/financeiro This cURL command demonstrates how to send a PATCH request to update a financial event installment. It includes authentication with a Bearer token and a JSON request body with example values for various fields. ```curl curl -i -X PATCH \ https://developers.contaazul.com/_mock/openapi/v1/financeiro/eventos-financeiros/parcelas/9986f173-f531-4660-96ae-04b71c879264 \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "nota": "Nota da parcela", "descricao": "Descrição da parcela", "vencimento": "2024-07-15", "composicao_valor": { "multa": 100.25, "juros": 1.5, "valor_bruto": 275.99, "valor_liquido": 250.33, "desconto": 2.1, "taxa": 4.4 }, "versao": 1, "data_pagamento_esperado": "2024-07-15", "metodo_pagamento": "CARTAO_CREDITO", "perda": { "data": "2024-07-15", "valor": 1.99 }, "nsu": 1029384756, "pagamento_agendado": false, "id_conta_financeira": "e12a84ed-fb5c-4b8c-af56-4448b947337c" }' ``` -------------------------------- ### cURL Example: Get Sale by ID Source: https://developers.contaazul.com/guide/openapi/venda/editsale This cURL command demonstrates how to make a GET request to retrieve a sale by its ID from the Conta Azul Pro API. It includes the necessary Authorization header with a placeholder for the bearer token. The example uses the mock server URL. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id}' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Example Sales API 200 OK Response Body Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda/post This JSON snippet illustrates a successful HTTP 200 OK response for retrieving a sale, providing a detailed example of the `cliente` (client), `evento_financeiro` (financial event), `notificacao` (notification), `natureza_operacao` (nature of operation), and `venda` (sale) objects with their respective fields and sample values. ```json { "cliente": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "tipo_pessoa": "Física", "documento": "12345678901", "nome": "João da Silva" }, "evento_financeiro": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }, "notificacao": { "id_referencia": "string", "enviado_para": "string", "enviado_em": "2019-08-24T14:15:22Z", "aberto_em": "2019-08-24T14:15:22Z", "status": "ENVIADO" }, "natureza_operacao": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "tipo_operacao": "VENDA", "template_operacao": "VENDA_MERCADORIAS", "label": "Venda a Não Contribuinte", "mudanca_financeira": true, "mudanca_estoque": "ENTRADA_ESTOQUE" }, "venda": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "REVISAO_PENDENTE", "id_legado": 0, "tipo_negociacao": "VENDA", "numero": 0, "id_categoria": "28aae0b9-0a40-4479-baff-3cbc83721b20", "data_compromisso": "2023-12-31", "configuracao_de_desconto": { }, "composicao_valor": { }, "condicao_pagamento": { }, "total_itens": { }, "observacoes": "string", "id_cliente": "2887ff7c-e8dc-4cd4-bd04-a5554a71c2de", "versao": 0, "tipo_pendencia": { }, "situacao": { }, "id_natureza_operacao": "df1c7a86-2b48-437c-b768-057e089cdcd2", "id_centro_custo": "51474982-bf91-4e21-81d5-2212e04a543c" } } ``` -------------------------------- ### API Request: Get Accounts Receivable Parameters Source: https://developers.contaazul.com/guide/openapi/financeiro/searchinstallmentstopaybyfilter Details the query parameters required for the GET /v1/financeiro/eventos-financeiros/contas-a-receber/buscar endpoint, including their types, constraints, and examples. ```APIDOC GET /v1/financeiro/eventos-financeiros/contas-a-receber/buscar Security: oAuth2 Query Parameters: pagina: integer (>= 1), required Description: Page number Default: 1 tamanho_pagina: integer (>= 1), required Description: Number of items per page Default: 10 campo_ordenado_ascendente: string Description: Field name for ascending order campo_ordenado_descendente: string Description: Field name for descending order descricao: string Description: Description filter data_vencimento_de: string (date), required Description: Due date from (ISO date format) data_vencimento_ate: string (date), required Description: Due date to (ISO date format) data_competencia_de: string (date) Description: Competence date from (ISO date format) data_competencia_ate: string (date) Description: Competence date to (ISO date format) data_pagamento_de: string (date) Description: Payment date from (ISO date format) data_pagamento_ate: string (date) Description: Payment date to (ISO date format) valor_de: string (regex: ^[0-9]+(\.[0-9]{1,2})?$) Description: Value from Example: 999.99 valor_ate: string (regex: ^[0-9]+(\.[0-9]{1,2})?$) Description: Value to Example: 999.99 status: Array of strings Description: List of status filters ids_contas_financeiras: Array of strings Description: List of financial account IDs ids_categorias: Array of strings Description: List of category IDs ids_centros_de_custo: Array of strings Description: List of cost center IDs ``` -------------------------------- ### Example JSON Response for Payment Details (200 OK) Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-pagar/post An example of a successful JSON response (200 OK) for payment details, illustrating the data format and typical values for various fields, including the nested 'valor_composicao' object. ```json { "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "versao": 1, "data_pagamento": "2023-10-01", "valor_composicao": { "multa": 0, "juros": 0, "valor_bruto": 1000, "desconto": 0, "taxa": 0 }, "conta_financeira": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "id_reconciliacao": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "id_parcela": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "id_solicitacao_cobranca": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "observacao": "Payment for invoice #1234", "metodo_pagamento": "CARTAO_CREDITO", "origem": "SALDO_CONTA_BANCARIA", "id_recibo_digital": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "tipo_evento_financeiro": "RECEITA", "nsu": "1234567890", "id_referencia": "REF1234", "atualizado_em": "2023-10-01T12:00:00Z", "anexos": [ { … } ] } ``` -------------------------------- ### Example JSON Response for Create Cost Center Source: https://developers.contaazul.com/guide/openapi/centro-de-custo/paths/~1v1~1centro-de-custo/post An example JSON payload returned upon successful creation of a new cost center, showing the unique ID, code, name, and active status. ```json { "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "codigo": "codigo_inserido_pelo_usuario", "nome": "Centro de custo do Robinho", "ativo": true } ``` -------------------------------- ### cURL Example: Get Sales Items with Pagination Source: https://developers.contaazul.com/guide/openapi/venda/editsale Illustrates how to make a GET request using cURL to retrieve sales items, including pagination parameters and an Authorization header. ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id_venda}/itens?pagina=1&tamanho_pagina=10' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Example: JSON Response for Accounts Receivable Source: https://developers.contaazul.com/guide/openapi/financeiro/searchinstallmentstopaybyfilter An example of the JSON payload returned by a successful call to the accounts receivable API, showing the structure for total items, item list, and summary totals. ```json { "itens_totais": 6, "itens": [ { … } ], "totais": { "ativo": 6, "inativo": 0, "todos": 6 } } ``` -------------------------------- ### API Documentation: Other Financial Operations Overview Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-pagar/post This section provides a high-level overview of additional API endpoints available for managing various financial operations, including product management, person registration, protocol handling, and sales. Each section lists the supported HTTP methods and their respective paths. ```APIDOC API Endpoints Overview: Produto: - GET /v1/produto/busca - POST /v1/produto - PUT /v1/produto/{id} - DELETE /v1/produto/{id} - POST /v1/produto/desativar Cadastro de Pessoas: - GET /v1/pessoa - POST /v1/pessoa - PUT /v1/pessoa/{id_cadastro_pessoa} - POST /v1/pessoa/exclusao-lote - GET /v1/pessoa/{id_cadastro_pessoa}/resumo - POST /v1/pessoa/desativacao - GET /v1/pessoa/legado/{uuidLegado}/resumo - POST /v1/pessoa/ativacao Protocolo: - GET /v1/protocolo/{id} Venda: - GET /v1/venda/{id} - PUT /v1/venda/{id} - GET /v1/venda/busca - POST /v1/venda - GET /v1/venda/{id}/imprimir - POST /v1/venda/exclusao-lote - GET /v1/venda/{id_venda}/itens ``` -------------------------------- ### Example 200 OK JSON Response for Financial Event Installments Source: https://developers.contaazul.com/guide/openapi/financeiro/paths/~1v1~1financeiro~1eventos-financeiros~1contas-a-receber/post An illustrative JSON object demonstrating the expected structure and data values for a successful 200 OK response from the financial event installments API endpoint. This example provides concrete values for various fields, including nested objects and arrays, showcasing a typical response payload. ```JSON { "evento": { "data_competencia": "01/01/2030", "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "condicao_pagamento": {}, "referencia": {}, "agendado": true, "tipo": "RECEITA" }, "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "versao": 0, "referencia": "string", "indice": 1, "conciliado": true, "status": "PENDENTE", "valor_pago": 10, "perda": { "data": "2024-07-15", "valor": 1.99 }, "nao_pago": 5, "data_vencimento": "01/01/2030", "data_pagamento_previsto": "01/01/2030", "descricao": "bla bla bla", "nota": "bla bla bla", "conta_financeira": { "id": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "banco": "string", "codigo_banco": 0, "nome": "string", "ativo": true, "tipo": "APLICACAO", "conta_padrao": true, "possui_config_boleto_bancario": true, "agencia": "string", "numero": "string" }, "id_conta_financeira": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "valor_composicao": { "multa": 10, "juros": 1, "valor_bruto": 20, "desconto": 0.1, "taxa": 0.03, "valor_liquido": 9 }, "metodo_pagamento": "DEPOSITO_BANCARIO", "nsu": null, "baixa_agendada": false, "baixas": [ {} ], "anexos": [ {} ], "solicitacoes_cobrancas": [ {} ], "id_ultima_solicitacao_pagamento": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "id_boleto_bancario_autorizado": "35473eec-4e74-11ee-b500-9f61de8a8b8b", "fatura": { "numero": 123, "rps": 1, "tipo_fatura": "NFE" }, "valor_total_liquido": 10, "id_ultimo_solicitacao_cobranca": "35473eec-4e74-11ee-b500-9f61de8a8b8b" } ``` -------------------------------- ### Example JSON Response for Search Cost Centers Source: https://developers.contaazul.com/guide/openapi/centro-de-custo/paths/~1v1~1centro-de-custo/post An example JSON payload returned upon a successful search for cost centers, showing the structure of the response body. ```json { "itens_totais": 6, "items": [ { … } ], "totais": { "ativo": 6, "inativo": 0, "todos": 6 } } ``` -------------------------------- ### Conta Azul Pro API Servers Source: https://developers.contaazul.com/guide/openapi/centro-de-custo/paths/~1v1~1centro-de-custo/post Lists the available mock and production server URLs for interacting with the Conta Azul Pro API. ```APIDOC Mock server: https://developers.contaazul.com/_mock/openapi/ Servidor de produção: https://api-v2.contaazul.com/ ``` -------------------------------- ### Retrieve Installments by Event ID API Source: https://developers.contaazul.com/guide/_spec/openapi Detailed API specification for the GET /parcelas/{id_evento} endpoint, including request parameters, success responses, and schema definitions for event and installment objects. ```APIDOC summary: Endpoint de parcelas por evento get: summary: Busca as parcelas de acordo com o id do evento description: Retorna as parcelas de acordo com o id do evento informado parameters: - name: id_evento in: path description: UUID ou ID legado do evento. required: true schema: type: string responses: '200': description: Lista de Parcelas content: application/json: schema: type: object properties: evento: type: object properties: data_competencia: type: string format: date example: 01/01/2030 id: type: string format: uuid example: 35473eec-4e74-11ee-b500-9f61de8a8b8b condicao_pagamento: type: object properties: quantidade_parcelas: type: integer example: 10 montante_fixo: type: boolean example: false referencia: type: object properties: id: type: string format: uuid example: 35473eec-4e74-11ee-b500-9f61de8a8b8b revisao: type: string example: 1 origem: type: string example: LANCAMENTO_FINANCEIRO enum: - LANCAMENTO_FINANCEIRO - DAS - FOLHA - TRANSFERENCIA - SALDO_CONTA_BANCARIA - VENDA - COMPRA - VENDA_AGENDADA - COMPRA_AGENDADA - IMPORTACAO_DOCUMENTO - IMPOSTO_RETIDO - SIC - NOTA_COMPRA - ANTECIPACAO - RENEGOCIACAO - HONORARIOS_CONTABEIS agendado: type: boolean example: true tipo: type: string example: RECEITA enum: - RECEITA - DESPESA id: type: string format: uuid example: 35473eec-4e74-11ee-b500-9f61de8a8b8b versao: type: integer format: int64 referencia: type: string indice: type: integer format: int32 example: 1 conciliado: type: boolean example: true status: type: string example: PENDENTE enum: - PENDENTE - QUITADO - CANCELADO valor_pago: type: number format: double example: 10 perda: type: object properties: data: type: string format: date example: '2024-07-15' valor: type: number example: 1.99 nao_pago: type: number format: double example: 5 data_vencimento: type: string format: date example: 01/01/2030 data_pagamento_previsto: type: string format: date example: 01/01/2030 descricao: type: string example: bla bla bla nota: type: string example: bla bla bla conta_financeira: type: object properties: id: type: string ``` -------------------------------- ### Conta Azul Pro API v2 Overview Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas/updatepersonregistration Provides general information about the Conta Azul Pro v2 API, including its purpose, OpenAPI specification download links, and available server environments (mock and production). ```APIDOC API Name: API's Conta Azul Pro (v2) Purpose: API for managing data in the Conta Azul Pro ERP system. OpenAPI Specification: JSON: /_spec/openapi.json?download YAML: /_spec/openapi.yaml?download Servers: Mock: https://developers.contaazul.com/_mock/openapi/ Production: https://api-v2.contaazul.com/ ``` -------------------------------- ### Get Sale by ID API Endpoint and cURL Example Source: https://developers.contaazul.com/guide/openapi/venda/paths/~1v1~1venda/post Detailed documentation for retrieving a specific sale record from Conta Azul Pro using its ID. This endpoint requires OAuth2 authentication and provides a cURL example for demonstration. ```APIDOC Endpoint: Obter venda por ID (Get Sale by ID) Method: GET Path: /v1/venda/{id} Request Parameters: id: string (required) Description: The legacy ID or UUID of the sale to be obtained. Security: oAuth2 (Bearer Token) Servers: Mock: https://developers.contaazul.com/_mock/openapi/v1/venda/{id} Production: https://api-v2.contaazul.com/v1/venda/{id} ``` ```curl curl -i -X GET \ 'https://developers.contaazul.com/_mock/openapi/v1/venda/{id}' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### cURL Example for Retrieving Person Summary by ID Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas/inativarcadastropessoa Demonstrates how to make a `GET` request to retrieve a person's summary by ID using cURL. It includes the mock server URL, authorization header, and an example `id_cadastro_pessoa` in the path. ```curl curl -i -X GET \ https://developers.contaazul.com/_mock/openapi/v1/pessoa/123e4567-e89b-12d3-a456-426614174000/resumo \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Conta Azul Pro API Servers Source: https://developers.contaazul.com/guide/openapi/cadastro-de-pessoas/paths/~1v1~1pessoa~1exclusao-lote/post Details the available server endpoints for the Conta Azul Pro API, including a mock server for development and the production server. ```APIDOC Servers: Mock server: https://developers.contaazul.com/_mock/openapi/ Production server: https://api-v2.contaazul.com/ ```