View as Markdown
Deftship icon

Deftship ACTION

Get Insurance Rate

Checks pricing for Insurance based on the supplied information. Also automatically creates an insurance and returns the pricing. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Deftship account once, then configure and run Get Insurance Rate 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-get-insurance-rate",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    deftship: { authProvisionId: "apn_xxxxxxx" },
    carrier: "Insurance Carrier",
    serviceCode: "Service Code",
  },
})

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.

Get Insurance Rate inputs
Property Type Description
carrier Insurance Carrier string
Carrier of the order going to be insured
Required Dynamic
serviceCode Service Code string
Service code of this order
Required Dynamic
shipmentDate Shipment Date string
Shipment date, in Y-m-d
Required
fromName From Address: Name string
The name in the sender address
Required
fromAttention From Address: Attention string
Attention of the sender
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
Required
toName To Address: Name string
The name in the receiver address
Required
toAttention To Address: Attention string
Attention of the receiver
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 To Address: Telephone string
The telephone number of the receiver
Required
trackingNumber Tracking Number string
Tracking number of the package going to be insured
Required
itemDescription Item string
Description of the item being shipped
Required
itemQuantity Quantity integer
Item piece count
Required
itemPrice Price string
Item piece price
Required
isInternational Is International boolean
Set to true if the shipment is international
Optional
isFreight Is Freight boolean
Set to true if the shipment is freight
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-get-insurance-rate
Version
0.0.3
App
Deftship
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes