View as Markdown
Deftship icon

Deftship ACTION

Create Freight Order

Initializes a new parcel order within Deftship. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Deftship account once, then configure and run Create Freight Order 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: "deftship-create-freight-order",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    deftship: { authProvisionId: "apn_xxxxxxx" },
    pickupDate: "Pickup Date",
    fromOpeningTime: "From Opening Time",
  },
})

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.

Create Freight Order inputs
Property Type Description
pickupDate Pickup Date string
Proposed pickup date, in Y-m-d
Required
fromOpeningTime From Opening Time string
Opening time of pickup address, in H:i
Required
fromClosingTime From Closing Time string
Closing time of pickup address, in H:i
Required
fromName From Address: Name string
The name in the sender address
Required
fromStreet From Address: Street string
The street address of the sender
Required
fromCity From Address: City string
The city address of the sender
Required
fromState From Address: State string
The state code of the sender
Required
fromZip From Address: Zip Code string
The zip code of the sender
Required
fromCountry From Address: Country string
The country code of the sender
Required
fromTelephone From Address: Telephone string
The telephone number of the sender. (must be a number 10-15 digits)
Required
toOpeningTime To Opening Time string
Opening time of delivery address, in H:i
Required
toClosingTime To Closing Time string
Closing time of delivery address, in H:i
Required
toName To Address: Name string
The name in the receiver address
Required
toStreet To Address: Street string
The street address of the receiver
Required
toCity To Address: City string
The city address of the receiver
Required
toState To Address: State string
The state code of the receiver
Required
toZip To Address: Zip Code string
The zip code of the receiver
Required
toCountry To Address: Country string
The country code of the receiver
Required
toTelephone From Address: Telephone string
The telephone number of the sender. (must be a number 10-15 digits)
Required
packageType Package Type string
The type of package
Required
itemCount Count integer
Pieces count
Required
length Length string
Length (IN)
Required
width Width string
Width (IN)
Required
height Height string
Height (IN)
Required
weight Weight string
Weight (LBS)
Required
description Description string
Description of the item
Required
price Price string
Price (Commodity Value) of the item
Optional
sku Sku string
PO number of the shipment
Optional
additionalFields Additional Fields object
An object of key/value pairs containing additional fields to add to the order
Optional

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
deftship-create-freight-order
Version
0.0.2
App
Deftship
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes