Skip to main content
POST
/
form-schedules
/
{id}
/
cancel
Cancelar programación
curl --request POST \
  --url https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.linahealthcareplatform.com/api/v1/form-schedules/{id}/cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "sch_def456",
  "status": "cancelled",
  "creditsRefunded": 3,
  "cancelledAt": "2026-05-14T11:00:00Z"
}

Path Parameters

id
string
required
ID de la programación a cancelar (ej. sch_def456).
{
  "id": "sch_def456",
  "status": "cancelled",
  "creditsRefunded": 3,
  "cancelledAt": "2026-05-14T11:00:00Z"
}
status
string
Estado actualizado a cancelled.
creditsRefunded
integer
Créditos devueltos al balance.
cancelledAt
string
Fecha y hora de la cancelación.
Solo se pueden cancelar programaciones con estado pending. Intentar cancelar una programación ya enviada (sent) devolverá un error 400.

Authorizations

Authorization
string
header
required

Token JWT obtenido via POST /auth/token

Path Parameters

id
string
required

Response

200 - application/json

Cancelada

id
string
status
string