API ReferenceapibookingPOST /v1/visits/{id}/cancel

POST /v1/visits/\{id\}/cancel

Service: booking · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string"
    }
  }
}

Responses

200 Visit cancelled

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "patient_id": {
      "type": "string"
    },
    "provider_id": {
      "type": "string"
    },
    "slot_id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "visit_type": {
      "type": "string"
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancel_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "brand_id",
    "patient_id",
    "provider_id",
    "slot_id",
    "status",
    "visit_type",
    "reason",
    "notes",
    "cancelled_at",
    "cancel_reason",
    "created_at",
    "updated_at"
  ]
}

404 Not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

412 Cannot cancel visit in current status

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://booking.platform.loop.health/v1/visits/{id}/cancel \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'