View as Markdown
Dispatch icon

Dispatch ACTION

Create Order

Create a new delivery order. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Dispatch account once, then configure and run Create 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: "dispatch-create-order",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    dispatch: { authProvisionId: "apn_xxxxxxx" },
    pickupBusinessName: "Pickup Business Name",
    pickupContactName: "Pickup Contact Name",
  },
})

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 Order inputs
Property Type Description
pickupBusinessName Pickup Business Name string
Name of the pickup business.
Required
pickupContactName Pickup Contact Name string
Name of the pickup contact.
Required
pickupContactPhoneNumber Pickup Contact Phone Number string
Phone number of the pickup contact. Required format: 123-123-1234.
Required
pickupAddress1 Pickup Address Line 1 string
Pickup address line 1.
Required
pickupAddress2 Pickup Address Line 2 string
Pickup address line 2.
Optional
pickupCity Pickup City string
Pickup city.
Required
pickupStateProvinceCode Pickup State/Province string
Pickup state or province code (e.g. MN).
Required
pickupPostalCode Pickup Postal Code string
Pickup postal code (e.g. 55431).
Required
pickupNotes Pickup Notes string
Notes for the driver about the pickup location.
Optional
dropOffBusinessName Drop-Off Business Name string
Name of the drop-off business.
Required
dropOffContactName Drop-Off Contact Name string
Name of the drop-off contact.
Required
dropOffContactPhoneNumber Drop-Off Contact Phone Number string
Phone number of the drop-off contact. Required format: 123-123-1234.
Required
dropOffAddress1 Drop-Off Address Line 1 string
Drop-off address line 1.
Required
dropOffAddress2 Drop-Off Address Line 2 string
Drop-off address line 2.
Optional
dropOffCity Drop-Off City string
Drop-off city.
Required
dropOffStateProvinceCode Drop-Off State/Province string
Drop-off state or province code (e.g. MN).
Required
dropOffPostalCode Drop-Off Postal Code string
Drop-off postal code (e.g. 55431).
Required
dropOffNotes Drop-Off Notes string
Notes for the driver about the drop-off location.
Optional
estimatedWeight Estimated Weight (lbs) integer
Estimated weight of the delivery in pounds.
Optional
quantityOfPackages Quantity of Packages integer
Number of packages/items in the order.
Required
vehicleType Vehicle Type string
Type or size of vehicle needed. If left blank, cargo van will be selected.
Optional
serviceType Service Type string
Level of service. If left blank, the best option based on times will be selected.
Optional
pickupDateTimeUtc Pickup Date/Time (UTC) string
Desired pickup date/time in ISO 8601 format (e.g. 2019-08-09T13:00:00.000Z). If not provided, items are assumed ready for immediate pickup.
Optional
dropOffDateTimeUtc Drop-Off Date/Time (UTC) string
Desired drop-off date/time in ISO 8601 format (e.g. 2019-08-09T16:00:00.000Z). If not provided, assumes 5pm at the drop-off location's timezone.
Optional
referenceNumber Reference Number string
External reference or PO number.
Optional
billingNotes Billing Notes string
Billing notes for this order. Not visible to the driver.
Optional
trackingEmailAddresses Tracking Email Addresses string
Email addresses the tracking link will be sent to. May be comma and/or space separated (e.g. aaa@example.com, bbb@example.com).
Optional
trackingPhoneNumbers Tracking Phone Numbers string
Phone numbers that tracking SMS messages will be sent to. May be comma and/or space separated (e.g. 555-111-2222, 555-222-3333).
Optional
needsUnloadingAssistance Needs Unloading Assistance boolean
Indicates if the order requires assistance unloading.
Optional
dedicatedVehicle Dedicated Vehicle boolean
Whether the order should use a dedicated vehicle.
Optional
organizationId Organization ID integer
Specify which organization the order should be placed under. Leave empty if not a multi-tier organization.
Optional Dynamic
addOns Add-Ons string[]
List of add-on services to include (e.g. dolly, inside_delivery).
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
dispatch-create-order
Version
0.0.1
App
Dispatch
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes