tracking_number.
This endpoint works for:
- Parcels created via Sendcloud shipments
- External parcels registered for tracking via the Create an external parcel for tracking endpoint
Calling the endpoint
To retrieve tracking information, send aGET request including the tracking number in the path:
Example request method and URL
Response
If successful, the API returns:- HTTP 200 status code
- A Parcel Tracking object containing:
- Parcel lifecycle timestamps:
created_at— When the parcel tracking object was created in Sendcloudannounced_at— When the parcel was handed to the carrierupdated_at— Last time tracking information was updated
details: Additional context such asexpected_delivery_date,integration_id, service point indicators, return flagstracking_numbers: Carrier tracking identifiers associated with the parcel.events: A list of tracking events representing delivery milestones, sorted from newest to oldest. Each event includes:phase: The main step of the delivery process the parcel is in, standardized across carriers, for examplein_transitordelivered.exception: What went wrong at this step, for exampledelivery_delayoraddress_error.nonewhen there is no exception.sub_status: Additional detail about the phase and exception, for examplenot_homefor a failed delivery attempt.nonewhen no additional detail applies.status_type: Whether the event is asuccess,warning, orerror.description: A human-readable description of the event.
- Parcel lifecycle timestamps:
events. Check its phase first. If phase is none, the event reports an exception instead, so check exception.
If Sendcloud couldn’t map a carrier status to a standardized status, phase, exception, sub_status, description, and status_type are null for that event.
If the tracking number is invalid or unknown, the API returns an error response instead of a parcel object.
See the API reference for the full response
schema.
Status definitions
Sendcloud consolidates all the variations of status messages received by different carriers into a standardized set of values. Each event describes the parcel’s status with a combination ofphase, exception, and sub_status.
Migrating from API v2? The v2 Retrieve tracking information of a
parcel endpoint returns a
parent_status field with a
human-readable status, such as At sorting centre. API v3 doesn’t return parent_status. Use the phase and
exception of the most recent event (the first event in events) instead. These are machine-readable values and
don’t map one-to-one to the v2 statuses. For the v2 statuses, see Tracking statuses
(v2).Phases
Thephase field describes the main step of the delivery process.
Claim events (
event_type is claim) use their own phases: open, in_progress, action_required, solved_by_automation_stage, manually_solved_stage, and unknown.
Exceptions
Theexception field describes what went wrong with the parcel. Events with an exception have phase set to none.
Sub-statuses
Thesub_status field adds detail to a phase or exception. For example, an event with the attempted phase and the inaccessible sub-status means the carrier couldn’t deliver the parcel because the address wasn’t accessible. Common values include not_home, neighbour, mailbox, damaged, and delay. sub_status is unknown when the status of the parcel couldn’t be determined.
Real-time event notifications
Instead of polling this endpoint for status changes, you can receive push notifications whenever parcel events occur. The Event Subscriptions API lets you configure webhooks or third-party integrations to be notified automatically.The Event Subscriptions API is currently in BETA.