Documentacion API - Webhooks
Esta documentación cubre los puntos finales para administrar webhooks.
1. Crear Webhook
Endpoint: POST /webhooks
Descripción: Crear un webhook.
Request Headers:
- Authorization: Bearer token
Request Body:
{
"idUser": "string",
"idLocker": "string",
"url": "string"
}
Response:
{
"id": "string" // ID of the created webhook
}
2. Listar Webhook
Endpoint: GET /api/v1/webhooks
Descripcion: Obtiene una lista de todos los webhooks.
Request Headers:
- Authorization: Bearer token
Response:
{
"id": "string",
"url": "string",
"lockerId": "string",
"userId": "string"
}
3. Actualizar Webhook
Endpoint: PATCH /webhooks/:id
Descripcion: Actualiza un webbhook.
Request Headers:
- Authorization: Bearer token
Request Parameters:
- id: The ID of the webhook to update.
Request Body:
{
"idUser": "string",
"idLocker": "string",
"url": "string"
}
Response:
{
"id": "string",
"url": "string",
"lockerId": "string",
"userId": "string"
}
4. Eliminar Webhook
Endpoint: DELETE /webhooks/:id
Description: Elimina un webhook especifico por ID.
Request Headers:
- Authorization: Bearer token
Request Parameters:
- id: The ID of the webhook to delete.
Response:
{
"message": "Webhook with ID {id} successfully removed"
}