### Create Schedule Block (cURL, PHP, Node.js) Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a schedule block with specified details. The request body includes responsible person ID, start and end times, start and end dates, and a description. Requires a valid authorization token. ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/bloqueio" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: application/json" \ -d '{ "id_responsavel": "12", "hora_inicio": "18:00", "hora_fim": "19:00", "data_inicio": "2023-06-20", "data_fim": "2023-06-20", "descricao": "Motivo do bloqueio" }' ``` ```php '12','hora_inicio'=>'18:00','hora_fim'=>'19:00','data_inicio'=>'2023-06-20','data_fim'=>'2023-06-20','descricao'=>'Motivo do bloqueio']; $ch=curl_init($u); curl_setopt_array($ch,[ CURLOPT_POST=>true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_POSTFIELDS=>json_encode($fields), CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX','Content-Type: application/json'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.post('https://SEU-USUARIO.adm.gendo.app/api/bloqueio',{ id_responsavel:'12', hora_inicio:'18:00', hora_fim:'19:00', data_inicio:'2023-06-20', data_fim:'2023-06-20', descricao:'Motivo do bloqueio' },{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Webhook Payload Example for Booking Insert/Update Source: https://gendo-doc-api.s3.amazonaws.com/index.html This is an example of the JSON payload sent by the Gendo API when a new appointment is created or an existing one is updated. It includes details about the appointment and associated patient and service information. ```json { "status": true, "type": "booking_insert", "username": "aflordap", "data": { "id": 41910, "data": "27/10/2025 15:00:00", "id_paciente": 11351, "nome_paciente": "Joana", "id_responsavel": 3, "nome_responsavel": "Claudio", "total": 400.00, "status": 1, "id_servico": 188, "nome_servico": "Barbax", "comentario": "", "lembrete": 0, "servicos": [] "tempo": "01:30:00", "telefone": "1340031234", "email": "cliente@gmail.com", "datajp": "2025-10-27 15:00:00", "ddi": 55, "canal_origem": "interno" } } ``` -------------------------------- ### GET /api/categoria Source: https://gendo-doc-api.s3.amazonaws.com/index.html Lists service categories with optional filters. ```APIDOC ## GET /api/categoria ### Description Lists service categories with optional filters. ### Method GET ### Endpoint /api/categoria ### Parameters #### Query Parameters - **filter** (string) - Optional - Filters to apply (e.g., `id_pai-eq-0`). - **order** (string) - Optional - The field to order the results by. - **limit** (integer) - Optional - The maximum number of results to return. - **offset** (integer) - Optional - The number of results to skip. ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/categoria?filter=id_pai-eq-0&order=asc&limit=10&offset=0" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) (No specific response schema provided in source) ``` -------------------------------- ### Get Appointments by Period Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieve appointments within a specified date range and order. Supports filtering by start and end dates, and sorting. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2023-06-21&Fim=2023-06-21&order=data-desc" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2023-06-21&Fim=2023-06-21&order=data-desc',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### GET /servicos-creditos Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves services of a professional/responsible and their available package credits for a patient/client if provided. ```APIDOC ## GET /servicos-creditos ### Description Retrieves services of a professional/responsible and their available package credits for a patient/client if provided. ### Method GET ### Endpoint https://SEU-USUARIO.adm.gendo.app/api/servicos-creditos ### Parameters #### Query Parameters - **id_responsavel** (integer) - Required - The ID of the responsible person. - **id_paciente** (integer) - Optional - The ID of the patient/client. ### Request Example ``` GET https://SEU-USUARIO.adm.gendo.app/api/servicos-creditos?id_responsavel=12&id_paciente=45 ``` ### Response #### Success Response (200) - **(response structure not provided)** #### Response Example (response example not provided) ``` -------------------------------- ### GET /api/profissionais Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves a list of professionals or responsible individuals. ```APIDOC ## GET /api/profissionais ### Description Retrieves a list of professionals or responsible individuals. ### Method GET ### Endpoint /api/profissionais ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of results to return. - **offset** (integer) - Optional - The number of results to skip. - **order** (string) - Optional - The field to order the results by. - **filter** (string) - Optional - Filters to apply to the results. ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/profissionais?limit=10&offset=0" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) (No specific response schema provided in source) ``` -------------------------------- ### Get Services and Credits Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieve services for a professional and their available package credits for a patient. Optional `id_paciente` parameter filters credits. ```cURL curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/servicos-creditos?id_responsavel=12&id_paciente=45" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```PHP true,CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX']]); echo curl_exec($ch); curl_close($ch); ``` ```Node.js const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/servicos-creditos?id_responsavel=12&id_paciente=45',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)).catch(console.error); ``` -------------------------------- ### GET /agendamento-logs/{id} Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves logs for a specific appointment. Requires an Authorization header. ```APIDOC ## GET /agendamento-logs/{id} ### Description Retrieves logs for a specific appointment. ### Method GET ### Endpoint /agendamento-logs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the appointment to retrieve logs for. #### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/1344" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) - The response body will contain the appointment logs. ``` -------------------------------- ### Node.js Webhook Receiver for Gendo Source: https://gendo-doc-api.s3.amazonaws.com/index.html This Node.js script uses Express to handle POST requests to the /webhook-gendo endpoint. It includes optional token verification and logs received 'booking_insert' events to the console. Ensure Express is installed (`npm install express`). ```javascript // Rota: POST /webhook-gendo const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.use(express.json()); // Token opcional — se vazio, a verificação é ignorada const expectedToken = ''; // Middleware opcional: verificação do Authorization Bearer app.use((req, res, next) => { if (expectedToken && expectedToken.trim() !== '') { const authHeader = req.headers['authorization']; if (!authHeader || authHeader !== `Bearer ${expectedToken}`) { return res.status(401).json({ error: 'Unauthorized' }); } } next(); }); app.post('/webhook-gendo', (req, res) => { const payload = req.body; // Validação mínima if (!payload || !payload.type || !payload.data || !payload.data.id) { res.status(422).json({ error: 'Unexpected payload format' }); return; } // Processamento do evento console.log('Received booking_insert event:', JSON.stringify(payload, null, 2)); // Confirmação de recebimento res.status(200).json({ status: 'ok' }); }); app.listen(PORT, () => { console.log(`Webhook receiver listening on port ${PORT}`); }); ``` -------------------------------- ### Get Appointment Logs Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieve logs for a specific appointment. Requires the appointment ID in the URL path. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/{id}" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/{id}',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### GET /agendamento-dados/{id} Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves complete data for a specific appointment. Requires an Authorization header. ```APIDOC ## GET /agendamento-dados/{id} ### Description Retrieves complete data for a specific appointment. ### Method GET ### Endpoint /agendamento-dados/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the appointment to retrieve data for. #### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-dados/1735" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) - The response body will contain the complete appointment data. ``` -------------------------------- ### GET /api/responsaveis-calendario Source: https://gendo-doc-api.s3.amazonaws.com/index.html Lists professionals/responsible individuals available in the calendar for a given date. ```APIDOC ## GET /api/responsaveis-calendario ### Description Lists professionals/responsible individuals available in the calendar for a given date. ### Method GET ### Endpoint /api/responsaveis-calendario ### Parameters (No specific parameters documented in source) ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/responsaveis-calendario" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) (No specific response schema provided in source) ``` -------------------------------- ### Get Days with Appointments Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieve a list of days that have at least one appointment. Can be filtered by date and optionally by responsible person's ID. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos-periodo?data=2023-06-21" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamentos-periodo?data=2023-06-21',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Get Appointment Logs Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves the logs for a specific appointment using its ID. ```APIDOC ## GET /api/agendamento-logs/{id} ### Description Retrieves the logs for a specific appointment. ### Method GET ### Endpoint /api/agendamento-logs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the appointment to retrieve logs for. ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/123" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### Get Appointments by Period Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves appointments within a specified period, with optional sorting. ```APIDOC ## GET /api/agendamentos ### Description Retrieves appointments within a specified period. ### Method GET ### Endpoint /api/agendamentos ### Parameters #### Query Parameters - **Inicio** (string) - Required - The start date of the period (YYYY-MM-DD). - **Fim** (string) - Required - The end date of the period (YYYY-MM-DD). - **order** (string) - Optional - The order to sort the results (e.g., `data-desc`). ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2023-06-21&Fim=2023-06-21&order=data-desc" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### GET /agendamentos-paciente/{id} Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves the total number of recurrences for an appointment. Requires an Authorization header. ```APIDOC ## GET /agendamentos-paciente/{id} ### Description Retrieves the total number of recurrences for an appointment. ### Method GET ### Endpoint /agendamentos-paciente/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the appointment to retrieve recurrence count for. #### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos-paciente/1731" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ### Response #### Success Response (200) - The response body will contain the total number of recurrences. ``` -------------------------------- ### Get Paginated Appointment List Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieve a paginated list of appointments, including removed ones. Supports filtering by date range, ordering, pagination, and search. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agenda-listagem?inicio_busca=2023-06-21&fim_busca=2023-06-21&limit=50&offset=0" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agenda-listagem?inicio_busca=2023-06-21&fim_busca=2023-06-21&limit=50&offset=0',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Get Appointments by Date Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves days with at least one appointment on a specific date, with an optional responsible ID filter. ```APIDOC ## GET /api/agendamentos-periodo ### Description Retrieves days with at least one appointment on a specific date. ### Method GET ### Endpoint /api/agendamentos-periodo ### Parameters #### Query Parameters - **data** (string) - Required - The date to check for appointments (YYYY-MM-DD). - **id_responsavel** (string) - Optional - The ID of the responsible person to filter by. ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos-periodo?data=2023-06-21" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### Get Paginated Appointments Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves appointments within a specified period with pagination and filtering options, including removed appointments. ```APIDOC ## GET /api/agenda-listagem ### Description Retrieves appointments within a specified period, with pagination and filtering options. Includes removed appointments. ### Method GET ### Endpoint /api/agenda-listagem ### Parameters #### Query Parameters - **inicio_busca** (string) - Required - The start date for the search (YYYY-MM-DD). - **fim_busca** (string) - Required - The end date for the search (YYYY-MM-DD). - **order** (string) - Optional - The order to sort the results. - **limit** (integer) - Optional - The maximum number of results to return. - **offset** (integer) - Optional - The number of results to skip. - **removidos** (boolean) - Optional - Whether to include removed appointments. - **search** (string) - Optional - A search term to filter appointments. - **tipo_busca** (string) - Optional - The type of search to perform. ### Request Example ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agenda-listagem?inicio_busca=2023-06-21&fim_busca=2023-06-21&limit=50&offset=0" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### POST /api/servico Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a new service. ```APIDOC ## POST /api/servico ### Description Creates a new service. ### Method POST ### Endpoint https://SEU-USUARIO.adm.gendo.app/api/servico ### Parameters #### Request Body - **nome** (string) - Required - The name of the service. - **valor** (string) - Required - The value of the service. - **timeminutes** (string) - Required - The duration of the service in minutes. - **id_categoria** (string) - Required - The ID of the service category. - **profissionais** (array of strings) - Required - IDs of the professionals offering the service. - **agendamento_online** (string) - Required - Indicates if the service can be booked online (e.g., '1' for yes). - **exibir_preco** (string) - Required - Indicates if the price should be displayed (e.g., '1' for yes). ### Request Example ```json { "nome": "Consulta", "valor": "95,00", "timeminutes": "30", "id_categoria": "339", "profissionais": ["10"], "agendamento_online": "1", "exibir_preco": "1" } ``` ### Response #### Success Response (200) - **(response structure not provided)** #### Response Example (response example not provided) ``` -------------------------------- ### POST /bloqueio Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a schedule block. Requires an Authorization header and multipart/form-data content type. ```APIDOC ## POST /bloqueio ### Description Creates a schedule block. ### Method POST ### Endpoint /bloqueio ### Parameters #### Request Body - **id_responsavel** (string) - Required - The ID of the responsible person. - **hora_inicio** (string) - Required - The start time of the block (e.g., '18:00'). - **hora_fim** (string) - Required - The end time of the block (e.g., '19:00'). - **data_inicio** (string) - Required - The start date of the block (e.g., '2023-06-20'). - **data_fim** (string) - Required - The end date of the block (e.g., '2023-06-20'). - **descricao** (string) - Required - A description for the block. #### Request Example ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/bloqueio" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'id_responsavel=12' \ -F 'hora_inicio=18:00' \ -F 'hora_fim=19:00' \ -F 'data_inicio=2023-06-20' \ -F 'data_fim=2023-06-20' \ -F 'descricao=Motivo do bloqueio' ``` ### Response #### Success Response (200) - The response body will indicate the success of the schedule block creation. ``` -------------------------------- ### Fetch Appointment Data (cURL, PHP, Node.js) Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves complete data for a specific appointment. Requires a valid authorization token. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-dados/1735" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamento-dados/1735',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Fetch Appointment Logs (cURL, PHP, Node.js) Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves logs for a specific appointment. Ensure your authorization token is valid. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/1344" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamento-logs/1344',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Create Service Source: https://gendo-doc-api.s3.amazonaws.com/index.html Use this endpoint to create a new service. The request body requires minimum fields like name, value, and duration. ```cURL curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/servico" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'nome=Consulta' -F 'valor=95,00' -F 'timeminutes=30' -F 'id_categoria=339' -F 'profissionais[]=10' -F 'agendamento_online=1' -F 'exibir_preco=1' ``` ```PHP 'Consulta','valor'=>'95,00','timeminutes'=>'30','id_categoria'=>'339','profissionais'=>['10'],'agendamento_online'=>'1','exibir_preco'=>'1']; $ch=curl_init($u); curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>$fields,CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX']]); echo curl_exec($ch); curl_close($ch); ``` ```Node.js const axios=require('axios'); const FormData=require('form-data'); const form=new FormData(); form.append('nome','Consulta'); form.append('valor','95,00'); form.append('timeminutes','30'); form.append('id_categoria','339'); form.append('profissionais[]','10'); form.append('agendamento_online','1'); form.append('exibir_preco','1'); axios.post('https://SEU-USUARIO.adm.gendo.app/api/servico',form,{headers:{Authorization:'Bearer XXX-TOKEN-XXX',...form.getHeaders()}}) .then(r=>console.log(r.data)).catch(console.error); ``` -------------------------------- ### Listar Agendamentos Source: https://gendo-doc-api.s3.amazonaws.com/index.html Recupere uma lista de agendamentos dentro de um período especificado e ordene os resultados. ```APIDOC ## GET /agendamentos ### Description Lista agendamentos com filtros de data e ordenação. ### Method GET ### Endpoint `https://SEU-USUARIO.adm.gendo.app/api/agendamentos` ### Parameters #### Query Parameters - **Inicio** (string) - Required - Data de início no formato AAAA-MM-DD. - **Fim** (string) - Required - Data de fim no formato AAAA-MM-DD. - **order** (string) - Optional - Critério de ordenação (ex.: `data-desc`). ### Request Example ```curl curl -X GET \ "https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2024-07-01&Fim=2024-07-25&order=data-desc" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### POST /api/bloqueio Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a new block with specified details. ```APIDOC ## POST /api/bloqueio ### Description Creates a new block with specified details. ### Method POST ### Endpoint https://SEU-USUARIO.adm.gendo.app/api/bloqueio ### Parameters #### Request Body - **id_responsavel** (integer) - Required - The ID of the responsible person. - **hora_inicio** (string) - Required - The start time of the block (HH:MM). - **hora_fim** (string) - Required - The end time of the block (HH:MM). - **data_inicio** (string) - Required - The start date of the block (YYYY-MM-DD). - **data_fim** (string) - Required - The end date of the block (YYYY-MM-DD). - **descricao** (string) - Required - Description of the block. ### Request Example ```json { "id_responsavel": "12", "hora_inicio": "18:00", "hora_fim": "19:00", "data_inicio": "2023-06-20", "data_fim": "2023-06-20", "descricao": "Motivo do bloqueio" } ``` ### Response #### Success Response (200) - **(response structure not provided)** #### Response Example (response example not provided) ``` -------------------------------- ### Create New Appointment Source: https://gendo-doc-api.s3.amazonaws.com/index.html Create a new appointment using multipart/form-data. Requires patient, responsible person, date, time, duration, status, and service ID. ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/agendamento" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'id_paciente=269' -F 'id_responsavel=10' -F 'data=2023-06-21' -F 'horario=13:45' -F 'tempo=75' -F 'status=1' \ -F 'id_servico=21' ``` ```php '269','id_responsavel'=>'10','data'=>'2023-06-21','horario'=>'13:45','tempo'=>'75','status'=>'1','id_servico'=>'21']; $ch=curl_init($u); curl_setopt_array($ch,[ CURLOPT_POST=>true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_POSTFIELDS=>$fields, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); const FormData=require('form-data'); const form=new FormData(); form.append('id_paciente','269'); form.append('id_responsavel','10'); form.append('data','2023-06-21'); form.append('horario','13:45'); form.append('tempo','75'); form.append('status','1'); form.append('id_servico','21'); axios.post('https://SEU-USUARIO.adm.gendo.app/api/agendamento',form,{headers:{Authorization:'Bearer XXX-TOKEN-XXX',...form.getHeaders()}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Create Appointment Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a new appointment using multipart/form-data. ```APIDOC ## POST /api/agendamento ### Description Creates a new appointment. ### Method POST ### Endpoint /api/agendamento ### Parameters #### Request Body - **id_paciente** (string) - Required - The ID of the patient. - **id_responsavel** (string) - Required - The ID of the responsible person. - **data** (string) - Required - The date of the appointment (YYYY-MM-DD). - **horario** (string) - Required - The time of the appointment (HH:MM). - **tempo** (string) - Required - The duration of the appointment in minutes. - **status** (string) - Required - The status of the appointment. - **id_servico** (string) - Required - The ID of the service. ### Request Example ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/agendamento" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'id_paciente=269' \ -F 'id_responsavel=10' \ -F 'data=2023-06-21' \ -F 'horario=13:45' \ -F 'tempo=75' \ -F 'status=1' \ -F 'id_servico=21' ``` ``` -------------------------------- ### Create Block Source: https://gendo-doc-api.s3.amazonaws.com/index.html Use this endpoint to create a new block. Ensure all required fields are provided in the request body. ```cURL curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/bloqueio" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'id_responsavel=12' -F 'hora_inicio=18:00' -F 'hora_fim=19:00' \ -F 'data_inicio=2023-06-20' -F 'data_fim=2023-06-20' \ -F 'descricao=Motivo do bloqueio' ``` ```PHP '12','hora_inicio'=>'18:00','hora_fim'=>'19:00','data_inicio'=>'2023-06-20','data_fim'=>'2023-06-20','descricao'=>'Motivo do bloqueio']; $ch=curl_init($u); curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>$fields,CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX']]); echo curl_exec($ch); curl_close($ch); ``` ```Node.js const axios=require('axios'); const FormData=require('form-data'); const form=new FormData(); form.append('id_responsavel','12'); form.append('hora_inicio','18:00'); form.append('hora_fim','19:00'); form.append('data_inicio','2023-06-20'); form.append('data_fim','2023-06-20'); form.append('descricao','Motivo do bloqueio'); axios.post('https://SEU-USUARIO.adm.gendo.app/api/bloqueio',form,{headers:{Authorization:'Bearer XXX-TOKEN-XXX',...form.getHeaders()}}) .then(r=>console.log(r.data)).catch(console.error); ``` -------------------------------- ### POST /api/servicos-restore/{id} Source: https://gendo-doc-api.s3.amazonaws.com/index.html Restores a previously removed service using its ID. ```APIDOC ## POST /api/servicos-restore/{id} ### Description Restores a previously removed service using its ID. ### Method POST ### Endpoint /api/servicos-restore/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the service to restore. #### Request Body - **id** (string) - Required - The ID of the service to be restored. ### Request Example ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/servicos-restore/123" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'id=123' ``` ### Response #### Success Response (200) (No specific response schema provided in source) ``` -------------------------------- ### Buscar Pacientes Source: https://gendo-doc-api.s3.amazonaws.com/index.html Realiza uma busca paginada de pacientes/clientes com base em diversos critérios. ```APIDOC ## GET /paciente-busca ### Description Busca paginada de pacientes/clientes. ### Method GET ### Endpoint `https://SEU-USUARIO.adm.gendo.app/api/paciente-busca` ### Parameters #### Query Parameters - **nome** (string) - Optional - Filtra por nome. - **telefone** (string) - Optional - Filtra por telefone. - **cpf** (string) - Optional - Filtra por CPF. - **email** (string) - Optional - Filtra por e-mail. - **limit** (integer) - Optional - Número de resultados por página. - **offset** (integer) - Optional - Deslocamento para paginação. - **order** (string) - Optional - Critério de ordenação (ex.: `nome-asc`). ### Request Example ```curl curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/paciente-busca?nome=ana&limit=10&offset=0" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ``` -------------------------------- ### Create or Edit Professional Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates a new professional or edits an existing one. Provide the professional's ID to edit, or omit/use '0' to create. Requires multipart/form-data. ```cURL curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/responsavel" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'nome=Prof. Demo' -F 'email=demo@gendo.com.br' -F 'telefone=11915709999' -F 'published=1' -F 'agenda=1' ``` ```PHP 'Prof. Demo','email'=>'demo@gendo.com.br','telefone'=>'11915709999','published'=>'1','agenda'=>'1']; $ch=curl_init($u); curl_setopt_array($ch,[ CURLOPT_POST=>true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_POSTFIELDS=>$fields, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ?> ``` ```Node.js const axios=require('axios'); const FormData=require('form-data'); const form=new FormData(); form.append('nome','Prof. Demo'); form.append('email','demo@gendo.com.br'); form.append('telefone','11915709999'); form.append('published','1'); form.append('agenda','1'); axios.post('https://SEU-USUARIO.adm.gendo.app/api/responsavel',form,{headers:{Authorization:'Bearer XXX-TOKEN-XXX',...form.getHeaders()}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### List Appointments Source: https://gendo-doc-api.s3.amazonaws.com/index.html Use this endpoint to list appointments within a specified date range and order. Requires an Authorization header. ```cURL curl -X GET \ "https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2024-07-01&Fim=2024-07-25&order=data-desc" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```PHP true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX']]); echo curl_exec($ch); curl_close($ch); ``` ```Node.js const axios = require('axios'); const url = 'https://SEU-USUARIO.adm.gendo.app/api/agendamentos?Inicio=2024-07-01&Fim=2024-07-25&order=data-desc'; axios.get(url,{ headers:{ Authorization:'Bearer XXX-TOKEN-XXX' } }) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### POST /api/responsavel Source: https://gendo-doc-api.s3.amazonaws.com/index.html Creates or edits a professional/responsible individual. Provide an ID to edit an existing record, or omit/send '0' to create a new one. ```APIDOC ## POST /api/responsavel ### Description Creates or edits a professional/responsible individual. Provide an ID to edit an existing record, or omit/send '0' to create a new one. ### Method POST ### Endpoint /api/responsavel ### Parameters #### Request Body - **id** (string) - Optional - The ID of the professional to edit. Omit or send '0' to create a new one. - **nome** (string) - Required - The name of the professional. - **email** (string) - Required - The email address of the professional. - **telefone** (string) - Required - The phone number of the professional. - **published** (string) - Required - Indicates if the professional is published (e.g., '1' for true). - **agenda** (string) - Required - Indicates if the professional is available for scheduling (e.g., '1' for true). ### Request Example ```bash curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/responsavel" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'nome=Prof. Demo' \ -F 'email=demo@gendo.com.br' \ -F 'telefone=11915709999' \ -F 'published=1' \ -F 'agenda=1' ``` ### Response #### Success Response (200) (No specific response schema provided in source) ``` -------------------------------- ### Fetch Patient Appointments (cURL, PHP, Node.js) Source: https://gendo-doc-api.s3.amazonaws.com/index.html Retrieves the total count of recurrences for a patient's appointments. Ensure the authorization token is correct. ```bash curl -X GET "https://SEU-USUARIO.adm.gendo.app/api/agendamentos-paciente/1731" \ -H "Authorization: Bearer XXX-TOKEN-XXX" ``` ```php true, CURLOPT_HTTPHEADER=>['Authorization: Bearer XXX-TOKEN-XXX'] ]); echo curl_exec($ch); curl_close($ch); ``` ```javascript const axios=require('axios'); axios.get('https://SEU-USUARIO.adm.gendo.app/api/agendamentos-paciente/1731',{headers:{Authorization:'Bearer XXX-TOKEN-XXX'}}) .then(r=>console.log(r.data)) .catch(console.error); ``` -------------------------------- ### Criar ou Editar Paciente Source: https://gendo-doc-api.s3.amazonaws.com/index.html Cria um novo paciente/cliente ou edita um existente fornecendo o ID. ```APIDOC ## POST /paciente ### Description Cria ou edita um paciente/cliente. Informe `id` para editar, ignore ou envie `0` para criar. ### Method POST ### Endpoint `https://SEU-USUARIO.adm.gendo.app/api/paciente` ### Parameters #### Request Body - **id** (string) - Optional - ID do paciente para edição. Ignorar ou usar "0" para criar. - **nome** (string) - Required - Nome completo do paciente. - **telefone** (string) - Required - Número de telefone do paciente. - **cpf** (string) - Required - CPF do paciente. ### Request Example ```curl curl -X POST "https://SEU-USUARIO.adm.gendo.app/api/paciente" \ -H "Authorization: Bearer XXX-TOKEN-XXX" \ -H "Content-Type: multipart/form-data" \ -F 'nome=Carlos Eduardo' -F 'telefone=11964985677' -F 'cpf=11122233399' ``` ```