UPS ACTION
Create Shipment
Create a new shipment. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's UPS account once, then configure and run Create Shipment 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: "ups-create-shipment",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
ups: { authProvisionId: "apn_xxxxxxx" },
shipperName: "Shipper Name",
shipperNumber: "Shipper Number",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "ups-create-shipment",
"configured_props": {
"ups": { "authProvisionId": "apn_xxxxxxx" },
"shipperName": "Shipper Name",
"shipperNumber": "Shipper Number"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "ups",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "ups-create-shipment",
arguments: {
shipperName: "Shipper Name",
shipperNumber: "Shipper Number",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
shipperName Shipper Name | string | The name of the shipper Required |
shipperNumber Shipper Number | string | Shipper's six digit alphanumeric account number Required |
shipperAddressLine Shipper Address Line | string | The address line of the shipper Required |
shipperCity Shipper City | string | The city of the shipper Required |
shipperStateProvinceCode Shipper State Province Code | string | The state province code of the shipper Required |
shipperPostalCode Shipper Postal Code | string | The postal code of the shipper Required |
shipperCountryCode Shipper Country Code | string | The country code of the shipper Required |
shipToName Ship To Name | string | The name of the ship to Required |
shipToAddressLine Ship To Address Line | string | The address line of the ship to Required |
shipToCity Ship To City | string | The city of the ship to Required |
shipToStateProvinceCode Ship To State Province Code | string | The state province code of the ship to Required |
shipToPostalCode Ship To Postal Code | string | The postal code of the ship to Required |
shipToCountryCode Ship To Country Code | string | The country code of the ship to Required |
serviceCode Service Code | string | The code of the service Required |
packagingCode Packaging Code | string | The code of the packaging Required |
weightUnit Weight Unit | string | The unit of weight for the package Required |
packageWeight Package Weight | string | The weight of the package Required |
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
- ups-create-shipment
- Version
- 0.0.2
- App
- UPS
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗