Skip to main content
DELETE
/
api
/
v1
/
appointments
/
{id}
/
shipments
curl --request DELETE \
  --url https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a/shipments \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "shipment_ids": ["P2604154821"]
  }'
[]
Remove one or more shipments from this appointment. Silently ignores shipments that are not currently linked. Mirror of Detach Appointments from Shipment. Same mutation rule as attach: the link can be removed when EITHER the appointment is past blood-draw, or the shipment was created less than 24 hours ago.

Request

Path parameters

id
string
required
Appointment UUID.

Body parameters

shipment_ids
string[]
required
Array of shipment reference IDs to detach. Must contain at least one item.

Response

On success, the API returns 200 OK with the full shipment list for the appointment, ordered newest-first by creation. Each entry has the same shape as Get Shipment.

Error responses

StatusDescription
400Validation error — e.g., empty shipment_ids or malformed reference.
403Forbidden — missing scope, appointment outside access context, or shipment outside access context.
404Appointment not found, or one or more shipments not found.
409Mutation rule failed — appointment not past blood-draw and at least one shipment is older than 24 hours. Response lists the IDs.
500Internal server error.
curl --request DELETE \
  --url https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a/shipments \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "shipment_ids": ["P2604154821"]
  }'
[]