AfterShip
AfterShip provides shipment tracking, courier detection and connections, and estimated delivery date prediction for ecommerce operations.
Tools (17)
Create Courier Connection
Connect one courier account using the courier-specific credential fields advertised by courier metadata.
Inputs: courier_slug, carrier_account_fields
Create Tracking
Create one shipment tracking record from a tracking number and optional courier, order, route, customer, and delivery metadata.
Inputs: id, note, title, language, order_id, customers, last_mile, order_date, location_id, origin_city, pickup_note, courier_slug, order_number, origin_state, tracking_key, custom_fields, delivery_type, order_id_path, shipment_tags, shipment_type, pickup_location, shipping_method, tracking_number, destination_city, destination_state, courier_slug_group, origin_postal_code, shipment_direction, tracking_ship_date, origin_raw_location, courier_connection_id, origin_country_region, destination_postal_code, tracking_account_number, destination_raw_location, destination_country_region, order_promised_delivery_date
Create Trackings Batch
Sequentially create 1-20 tracking records through AfterShip's single-record create endpoint. This operation is non-atomic: each item consumes one request, successful earlier creates are not rolled back, and no create is retried automatically. Item-specific 400 and 409 rejections do not stop later items; authentication, permission, rate-limit, server, malformed-success, and transport failures stop processing and mark remaining items not_attempted.
Inputs: trackings
Delete Courier Connection
Permanently remove one courier account connection by an ID obtained from list or create. Warning: this destructive action cannot be undone.
Inputs: courier_connection_id
Delete Tracking
Permanently delete one tracking record by its AfterShip tracking ID. Warning: this destructive action cannot be undone.
Inputs: tracking_id
Detect Courier
Return couriers that may handle a tracking number, using optional courier and shipment hints to narrow detection.
Inputs: tracking_key, courier_slugs, tracking_number, destination_state, courier_slug_group, tracking_ship_date, origin_country_region, destination_postal_code, tracking_account_number, destination_country_region
Get Courier Connection
Return one courier account connection by an ID obtained from list or create.
Inputs: courier_connection_id
Get Tracking
Return one tracking record by its AfterShip tracking ID, with optional field selection and checkpoint translation.
Inputs: fields, language, tracking_id
List Courier Connections
Return one cursor-controlled page of courier account connections, optionally filtered by courier slug.
Inputs: limit, cursor, courier_slug
List Couriers
Return courier metadata, optionally limited to account-activated couriers or selected courier slugs, including required tracking and credential field definitions.
Inputs: active, courier_slugs
List Trackings
Return one cursor-controlled page of shipment trackings, optionally filtered by identifiers, courier, status, dates, route, or shipment metadata.
Inputs: tag, limit, cursor, fields, keyword, order_ids, transit_time, courier_slugs, shipment_tags, created_at_max, created_at_min, updated_at_max, updated_at_min, return_to_sender, tracking_numbers, origin_country_regions, destination_country_regions, courier_destination_country_region
Mark Tracking Completed
Mark a tracking as delivered, lost, or returned to sender. Warning: a successful call stops automatic tracking updates until the tracking is retracked.
Inputs: reason, tracking_id, event_datetime
Predict Estimated Delivery Date
Predict an estimated delivery date before a tracking number exists. This paid endpoint requires Predict trial access or an AfterShip advanced plan.
Inputs: weight, pickup_time, courier_slug, package_count, origin_address, estimated_pickup, service_type_name, destination_address
Predict Estimated Delivery Dates Batch
Predict estimated delivery dates atomically for one to five planned shipments. One invalid item fails the whole batch. The connected AfterShip organization must have a Predict trial or advanced-plan entitlement.
Inputs: estimated_delivery_dates
Retrack Tracking
Restart automatic updates for an expired tracking. Only expired trackings are eligible, and each successful call irreversibly consumes one of at most three retrack attempts for that tracking.
Inputs: tracking_id
Update Courier Connection
Replace carrier-specific credentials on an existing courier account connection. Warning: this consequential credential rotation replaces the complete credential set; incorrect values can stop future tracking updates.
Inputs: courier_connection_id, carrier_account_fields
Update Tracking
Update editable order, courier, route, customer, and delivery metadata on an existing tracking record.
Inputs: note, title, language, order_id, customers, last_mile, order_date, location_id, origin_city, pickup_note, tracking_id, courier_slug, order_number, origin_state, tracking_key, custom_fields, delivery_type, order_id_path, shipment_type, pickup_location, shipping_method, destination_city, destination_state, origin_postal_code, shipment_direction, tracking_ship_date, origin_raw_location, origin_country_region, destination_postal_code, tracking_account_number, destination_raw_location, destination_country_region, order_promised_delivery_date