### Install Project Dependencies Source: https://github.com/soyio-id/soyio-docs/blob/main/README.md Installs the necessary dependencies for the project using npm. This is typically the first step after cloning the repository. ```bash npm install ``` -------------------------------- ### Start Local Development Server Source: https://github.com/soyio-id/soyio-docs/blob/main/README.md Starts a local development server for Soyio. This command allows for live preview of changes without manual server restarts. ```bash npm start ``` -------------------------------- ### Request Parameters for Consent Action Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/show-consent-action.api.mdx This snippet details the request parameters required to get a consent action. It specifies the 'id' parameter, its type, whether it's required, and provides an example. ```javascript import ParamsDetails from "@theme/ParamsDetails"; ``` -------------------------------- ### Get Product Version Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-product-version.api.mdx Retrieves a specific version of a product using its ID and the version ID. This GET request requires both 'id' and 'version_id' as path parameters. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Obtener una versión específica de un producto ``` -------------------------------- ### Request Parameters for GET /consent_templates Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-consent-templates.api.mdx Defines the query parameters available for the GET /consent_templates endpoint, including pagination (page, per_page) and sorting (order_by). ```javascript import ParamsDetails from "@theme/ParamsDetails"; ``` -------------------------------- ### Obtener todos los productos (GET /products) Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-products.api.mdx Realiza una solicitud GET a la ruta /products para recuperar todos los productos. Soporta parámetros de consulta para paginación (page, per_page) y ordenación (order_by). ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` ```html ``` -------------------------------- ### Get Product Versions Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-product-versions.api.mdx This snippet demonstrates how to make a GET request to the Soyio API to fetch all versions of a specific product. It includes path parameters for the product ID and query parameters for controlling pagination and sorting of the results. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Obtener todas las versiones de un producto ``` -------------------------------- ### Obtener todas las claves API (GET /api_keys) Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-api-keys.api.mdx Este snippet muestra cómo realizar una solicitud GET a la ruta /api_keys para recuperar todas las claves API. Soporta parámetros de consulta para paginación (page, per_page) y ordenación (order_by). ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Obtener todas las claves API ``` -------------------------------- ### Get All Auth Requests Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-auth-requests.api.mdx This snippet demonstrates how to fetch all authentication requests from the SoyIO API. It utilizes the GET method on the `/auth_requests` endpoint and shows how to include query parameters for pagination, filtering, and sorting. ```javascript fetch('/auth_requests?page=1&per_page=20&where={"status":{"=":"awaiting_authentication"}}&order_by=created_at DESC', { method: 'GET', headers: { 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ```bash curl -X GET "https://api.soy.io/auth_requests?page=1&per_page=20&where=%7B%22status%22%3A%7B%22%3D%22%3A%22awaiting_authentication%22%7D%7D&order_by=created_at%20DESC" \ -H "Content-Type: application/json" ``` -------------------------------- ### Obtener versión de acuerdo (GET) Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-agreement-version.api.mdx Este snippet muestra cómo realizar una solicitud GET para obtener una versión específica de un acuerdo a través de la API de Soyio. Requiere el ID del acuerdo y el número de versión como parámetros de ruta. ```bash curl -X GET "https://api.soy.io/v1/agreements/{id}/versions/{versionNumber}" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### GET /consent_templates Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-consent-templates.api.mdx Retrieves a list of all consent templates. Supports pagination and ordering of results. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Obtener Template de Consentimiento por ID (GET) Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-consent-template.api.mdx Este snippet muestra cómo realizar una solicitud GET a la API de Soyio para recuperar la última versión de un template de consentimiento específico, identificado por su ID. Requiere el ID del template como parámetro de ruta. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Obtener la última versión de un template de consentimiento ``` -------------------------------- ### GET /webhooks/{id} Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-webhook.api.mdx Realiza una solicitud GET para obtener los detalles de un webhook específico utilizando su ID. Requiere el ID del webhook como parámetro en la ruta. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### GET /webhooks Endpoint Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-webhooks.api.mdx Retrieves a list of all webhooks. Supports pagination using 'page' and 'per_page' parameters, and ordering via 'order_by'. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### GET /agreements/{id} Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-agreement.api.mdx Este snippet muestra cómo obtener los detalles de un acuerdo específico utilizando el método GET en la ruta /agreements/{id}. Requiere un ID de acuerdo como parámetro de ruta. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Request Parameters for Webhooks Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-webhooks.api.mdx Defines the query parameters for the GET /webhooks request, including pagination and sorting options. ```javascript import ParamsDetails from "@theme/ParamsDetails"; ``` -------------------------------- ### Request Parameters for Get Specific Branch Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-branch.api.mdx This snippet details the request parameters required to get a specific branch. It specifies that the 'id' parameter is a required string in the path, with an example value provided. ```javascript import ParamsDetails from "@theme/ParamsDetails"; ``` -------------------------------- ### GET /events - Request Parameters Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-events.api.mdx This snippet details the query parameters available for the GET /events endpoint. These include 'page' and 'per_page' for pagination, 'where' for JSON-formatted filters (with examples for event name and date range), and 'order_by' for sorting results. ```javascript import ParamsDetails from "@theme/ParamsDetails"; \":\"2024-01-01\",\"<\":\"2024-12-31\"}}"}}}, {"name":"order_by","in":"query","description":"Orden de los resultados (ej. \"created_at DESC\")","required":false,"schema":{"type":"string"},"example":"created_at DESC"} ]} > ``` -------------------------------- ### GET /products/{id} Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-product.api.mdx Este endpoint permite recuperar la información de la última versión de un producto específico. Requiere el ID del producto como parámetro en la ruta. La respuesta exitosa (código 200) contendrá los detalles del producto, incluyendo su ID, nombre, versión y fecha de creación. También se manejan errores de autenticación (401) y de recurso no encontrado (404). ```HTTP GET /products/{id} ``` -------------------------------- ### Parámetros de consulta para obtener productos Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-products.api.mdx Define los parámetros de consulta aceptados para la solicitud GET /products. Incluye 'page' para el número de página, 'per_page' para la cantidad de elementos por página y 'order_by' para especificar el orden de los resultados. ```javascript import ParamsDetails from "@theme/ParamsDetails"; ``` -------------------------------- ### Crear un producto - POST /products Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/create-product.api.mdx Este snippet muestra cómo crear un producto utilizando el método POST en la ruta /products. Se detalla la estructura del cuerpo de la solicitud en formato JSON, que incluye un ID de producto obligatorio. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` ```json { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "ID único del producto. Se recomienda darle un identificador con un formato que facilite su identificación.", "example": "my_product_123" } } } } } } ``` -------------------------------- ### Get Consent Action Endpoint Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/show-consent-action.api.mdx This snippet shows how to make a GET request to retrieve a specific consent action by its ID. It includes the endpoint path and the necessary parameter. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Build Static Site Source: https://github.com/soyio-id/soyio-docs/blob/main/README.md Generates the static content for the Soyio website. The output is placed in the 'build' directory, ready for deployment to any static hosting service. ```bash npm build ``` -------------------------------- ### Respuestas de la API para Crear Producto Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/create-product.api.mdx Detalla las posibles respuestas de la API al intentar crear un producto. Incluye el código de estado 201 para éxito (producto creado), 401 para errores de autenticación y 422 para errores de validación. ```json { "201": { "description": "Producto creado", "content": { "application/json": { "schema": { "type": "object", "properties": { "product": { "x-tags": [ "Products" ], "type": "object", "description": "Diferentes productos o servicios que ofrece tu compañía.\n\nEste modelo es versionado, por lo que cada cambio realizado genera una nueva versión, dejando trazable el historial de cambios.\n", "properties": { "id": { "type": "string", "description": "ID único del producto.", "example": "my_product_123" }, "name": { "type": "string", "description": "Nombre del producto", "example": "Mi Producto" }, "version": { "type": "integer", "description": "Versión del producto", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "description": "Fecha y hora de creación del producto", "example": "2024-03-20T15:30:00Z" } }, "title": "Product" } } } } } }, "401": { "description": "Error de autenticación", "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "title", "status", "detail" ], "properties": { "type": { "type": "string", "example": "authentication_error" }, "title": { "type": "string", "example": "Unauthorized" }, "status": { "type": "integer", "example": 401 }, "detail": { "type": "string", "example": "We could not authenticate your credentials. Please check the documentation at https://docs.soyio.id" } } } } } }, "422": { "description": "Error de validación", "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "title", "status", "errors" ], "properties": { "type": { "type": "string", "example": "validation_error" }, "title": { "type": "string", "example": "Validation error" }, "status": { "type": "integer", "example": 422 }, "errors": { "type": "array", "items": { "type": "string" } } }, "title": "ValidationError" } } } } } ``` -------------------------------- ### GET /signature_attempts Endpoint Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-signature-attempts.api.mdx This snippet shows how to make a GET request to the /signature_attempts endpoint to retrieve signature attempts. It includes parameters for pagination, filtering, and sorting. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Obtener API Key por ID Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-api-key.api.mdx Este snippet muestra cómo obtener una API key específica utilizando su ID. Requiere el ID de la API key como parámetro en la ruta. No hay cuerpo de solicitud necesario. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Get Event Details Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-event.api.mdx Retrieves the details of a specific event by its ID. This is a GET request to the /events/{id} endpoint. The 'id' parameter is a required path parameter of type string. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` ```html ``` -------------------------------- ### Regenerate API Documentation Source: https://github.com/soyio-id/soyio-docs/blob/main/README.md Regenerates the API reference files using the project's custom plugin. This process cleans existing files, generates new ones from the latest OpenAPI specification, and applies customizations. ```bash npm run docusaurus regenerate-api-docs ``` -------------------------------- ### Get Disclosure Request by ID Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/get-disclosure-request.api.mdx Retrieves a specific disclosure request from the Soyio API using its unique identifier. This GET request requires the disclosure request ID in the path. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Obtener un disclosure request específico ``` -------------------------------- ### GET /events - Retrieve All Events Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-events.api.mdx This snippet demonstrates how to make a GET request to the /events endpoint to retrieve a list of all events. It includes parameters for pagination (page, per_page), filtering (where), and ordering (order_by). ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; ``` -------------------------------- ### Run ESLint for Linting Source: https://github.com/soyio-id/soyio-docs/blob/main/README.md Executes ESLint to check the codebase for linting offenses and code style issues. It helps maintain code quality and consistency. ```bash npm run lint ``` -------------------------------- ### GET /disclosure_requests Endpoint Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/index-disclosure-requests.api.mdx This snippet demonstrates how to make a GET request to the /disclosure_requests endpoint to retrieve a list of disclosure requests. It includes common query parameters for pagination, filtering, and sorting. ```javascript fetch('/disclosure_requests', { method: 'GET', headers: { 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### Actualizar API Key con PATCH Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/update-api-key.api.mdx Utiliza el método PATCH en la ruta /api_keys/{id} para actualizar una API key existente. Debes proporcionar el ID de la API key en la ruta y un cuerpo de solicitud JSON que contenga la etiqueta actualizada. ```javascript import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading"; Actualizar una API key ``` -------------------------------- ### Estructura de Solicitud para Crear Webhook Source: https://github.com/soyio-id/soyio-docs/blob/main/docs/api/resources/create-webhook.api.mdx Describe la estructura esperada para el cuerpo de la solicitud al crear un webhook. Se utiliza un componente `RequestSchema` para visualizar la definición del esquema del cuerpo. ```javascript import RequestSchema from "@theme/RequestSchema"; ```