Eliminar un pago
DELETE
/teams/{teamId}/trips/{tripId}/payments/{paymentId}
const url = 'https://api.dev.lade.com.mx/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/trips/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.dev.lade.com.mx/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/trips/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Elimina (soft delete) un pago registrado. Solo OWNER o ADMIN. Registra una entrada en la bitácora de auditoría del equipo.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»teamId
required
string format: uuid
ID del equipo (UUID)
tripId
required
string format: uuid
ID del viaje (UUID)
paymentId
required
string format: uuid
ID del pago (UUID)
Responses
Sección titulada «Responses»Pago eliminado
Media typeapplication/json
object
message
string
paymentId
string format: uuid
Example
{ "message": "Payment deleted", "paymentId": "aa0e8400-e29b-41d4-a716-446655440005"}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}Recurso no encontrado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Not found", "message": "Resource not found"}