Skip to main content
PATCH
/
api
/
v1
/
shipments
/
{id}
curl --request PATCH \
  --url https://anivahealth.com/api/v1/shipments/P2604154821 \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "pickup_date": "2026-04-16",
    "pickup_time_from": "10:00",
    "pickup_time_till": "13:00"
  }'
{
  "id": "P2604154821",
  "status": "pending",
  "logistics_provider": "go",
  "tracking_number": null,
  "origin": {
    "location_id": "8f3a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Aniva Berlin Mitte",
    "street": "Unter den Linden",
    "house_number": "42",
    "postal_code": "10117",
    "city": "Berlin",
    "country": "DE",
    "phone": "+4930987654321",
    "email": "berlin-mitte@anivahealth.com"
  },
  "destination": {
    "location_id": null,
    "name": "LabClinic GmbH",
    "street": "Laborstraße",
    "house_number": "10",
    "postal_code": "80331",
    "city": "München",
    "country": "DE",
    "phone": null,
    "email": null
  },
  "pickup": {
    "from": "2026-04-16T10:00:00+02:00",
    "till": "2026-04-16T13:00:00+02:00",
    "timezone": "Europe/Berlin"
  },
  "notes": null,
  "status_updates": [],
  "appointments": [],
  "created_at": "2026-04-03T14:30:00Z",
  "updated_at": "2026-04-03T15:10:00Z"
}
Update shipment details such as pickup schedule, package count, or notes. If any logistics-relevant fields change (pickup date, time, package count, or weight), the existing logistics order is cancelled and a new one is created automatically. Fields you omit are preserved from the existing shipment. Updated schedule fields are validated against the pickup schedule rules.
Shipments cannot be modified after pickup. Attempting to update a shipment that has already been picked up returns 409 Conflict.

Request

Path parameters

id
string
required
Shipment reference ID (e.g., P2604154821).

Body parameters

All body parameters are optional — only include the fields you want to change.
pickup_date
string
New pickup date in YYYY-MM-DD format, interpreted in the origin location’s timezone.
pickup_time_from
string
New earliest pickup time in HH:MM format, interpreted as wall-clock time in the origin location’s timezone.
pickup_time_till
string
New latest pickup time in HH:MM format, interpreted as wall-clock time in the origin location’s timezone.
package_count
integer
New number of packages.
weight
number
New weight in kg.
notes
string
New notes or remarks. Maximum 128 characters.

Response

On success, the API returns 200 OK with the updated shipment.
id
string
required
Shipment reference identifier.
status
string
required
Shipment lifecycle status. One of pending, in_transit, delivered, fault, or cancelled.
logistics_provider
string
required
Logistics provider. One of go, dhl, or tof.
tracking_number
string
External tracking number from the logistics provider. May be null.
origin
object
Pickup address. May be null.
destination
object
Delivery address. Same structure as origin. May be null.
pickup
object
Scheduled pickup window. May be null.
notes
string
Optional notes. May be null.
status_updates
object[]
required
Chronological lifecycle events from the logistics provider (oldest first). Each entry has a status (free-form provider-sourced label) and time (ISO 8601). Empty array if no events observed yet.
appointments
ShipmentAppointmentLink[]
required
Appointments linked to this shipment, oldest-link first. Each entry is { id, added_at }; cross-reference each id against Get Appointment.
created_at
string
required
Creation timestamp (ISO 8601).
updated_at
string
Last update timestamp (ISO 8601). May be null.

Error responses

StatusDescription
400Validation error — e.g., invalid date or time format.
403Forbidden — your API key does not have access to this operation or the shipment is outside your access context.
404Shipment not found.
409Shipment cannot be modified after pickup.
500Internal server error.
502Logistics provider rejected the request (e.g., cancellation or re-creation failed). Includes the provider’s error message.
curl --request PATCH \
  --url https://anivahealth.com/api/v1/shipments/P2604154821 \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "pickup_date": "2026-04-16",
    "pickup_time_from": "10:00",
    "pickup_time_till": "13:00"
  }'
{
  "id": "P2604154821",
  "status": "pending",
  "logistics_provider": "go",
  "tracking_number": null,
  "origin": {
    "location_id": "8f3a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "name": "Aniva Berlin Mitte",
    "street": "Unter den Linden",
    "house_number": "42",
    "postal_code": "10117",
    "city": "Berlin",
    "country": "DE",
    "phone": "+4930987654321",
    "email": "berlin-mitte@anivahealth.com"
  },
  "destination": {
    "location_id": null,
    "name": "LabClinic GmbH",
    "street": "Laborstraße",
    "house_number": "10",
    "postal_code": "80331",
    "city": "München",
    "country": "DE",
    "phone": null,
    "email": null
  },
  "pickup": {
    "from": "2026-04-16T10:00:00+02:00",
    "till": "2026-04-16T13:00:00+02:00",
    "timezone": "Europe/Berlin"
  },
  "notes": null,
  "status_updates": [],
  "appointments": [],
  "created_at": "2026-04-03T14:30:00Z",
  "updated_at": "2026-04-03T15:10:00Z"
}