View as Markdown
AfterShip icon

AfterShip ACTION

Update Tracking

Updates an existing tracking. See the documentation
  • Action
  • Writes data
  • Destructive
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's AfterShip account once, then configure and run Update Tracking from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "aftership-update-tracking",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    aftership: { authProvisionId: "apn_xxxxxxx" },
    slug: "Slug",
    title: "Title",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Update Tracking inputs
Property Type Description
slug Slug string
The unique code of the courier. Get courier codes here.
Optional
title Title string
By default this field shows the tracking_number, but you can customize it as you wish with any info (e.g. the order number).
Optional
smses SMSes string[]
The phone number(s) to receive sms notifications. Enter + andarea code before phone number. Accept either array or comma separated as input. Supports up to 3 phone numbers.
Optional
emails Emails string[]
Email address(es) to receive email notifications. Accept either array or comma separated as input. Supports up to 3 email addresses.
Optional
customerName Customer Name string
Customer name of the tracking.
Optional
orderId Order ID string
A globally-unique identifier for the order.
Optional
orderIdPath Order ID Path string
The URL for the order in your system or store.
Optional
customFields Custom Fields object
Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any personal data in custom fields.
Optional
orderNumber Order Number string
A unique, human-readable identifier for the order.
Optional
language Language string
The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language.
Optional
orderPromisedDeliveryDate Order Promised Delivery Date string
The promised delivery date of the order. It uses the format YYYY-MM-DD.
Optional
deliveryType Delivery Type string
Shipment delivery type.
Optional
pickupLocation Pickup location string
Shipment pickup location for receiver.
Optional
pickupNote Pickup Note string
Shipment pickup note for receiver.
Optional
trackingAccountNumber Tracking Account Number string
The shipper's carrier account number. Refer to this article on additional tracking fields for more details.
Optional
trackingKey Tracking Key string
A type of tracking credential required by some carriers. Refer to this article on additional tracking fields for more details.
Optional
trackingShipDate Tracking Ship Date string
The date the shipment was sent, using the format YYYYMMDD. Refer to this article on additional tracking fields for more details.
Optional
originCountryIso3 Origin Country ISO3 string
The ISO Alpha-3 code (3 letters) for the origin country/region. E.g. USA for the United States. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
originState Origin State string
The state of the sender's address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
originCity Origin City string
The city of the sender's address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
originPostalCode Origin Postal Code string
The postal of the sender's address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
originRawLocation Origin Raw Location string
The sender address that the shipment is shipping from. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
destinationCountryIso3 Destination Country ISO3 string
The ISO Alpha-3 code (3 letters) for the destination country/region. E.g. USA for the United States. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
destinationState Destination State string
The state of the recipient's address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
destinationCity Destination City string
The city of the recipient's address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
Optional
note Note string
Text field for the note.
Optional
orderDate Order Date string
Order date in YYYY-MM-DDTHH:mm:ssZ format. e.g. 2021-07-26T11:23:51-05:00
Optional
shipmentType Shipment Type string
The carrier service type for the shipment. If you provide info for this field, AfterShip will not update it with info from the carrier.
Optional
trackingId Tracking ID string
The unique identifier of a tracking
Required Dynamic

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
aftership-update-tracking
Version
0.1.1
App
AfterShip
Authentication
API key
Read-only
No
Destructive
Yes
Open world
Yes