View as Markdown
Universal API icon

Universal API ACTION

Create Distributor Order

Create a new order via the Distributors API on Universal API. Use List Distributor Products to discover valid product identifiers for the order items. See the documentation.
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Universal API account once, then configure and run Create Distributor 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: "universal_api-create-distributor-order",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    universal_api: { authProvisionId: "apn_xxxxxxx" },
    consumerId: "Consumer ID",
    contactEmail: "Contact Email",
  },
})

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 Distributor Order inputs
Property Type Description
consumerId Consumer ID string
The consumer ID. Run List Consumers first to find valid IDs.
Required
contactEmail Contact Email string
Contact email for the order.
Required
customerIdentifier Customer Identifier string
Customer identifier for the order.
Optional
referenceIdentifier Reference Identifier string
Your reference identifier for the order.
Optional
comment Comment string
Free-text comment for the order.
Optional
shippingAddress Shipping Address object
Shipping address object. Keys: companyName, address1, address2, city, postalCode, countryCode, phoneNumber. Example: {"companyName":"Acme","address1":"1 Main St","city":"Oslo","postalCode":"0150","countryCode":"NO","phoneNumber":"+4790000000"}.
Required
billingAddress Billing Address object
Billing address object with the same keys as shippingAddress. Example: {"companyName":"Acme","address1":"1 Main St","city":"Oslo","postalCode":"0150","countryCode":"NO","phoneNumber":"+4790000000"}.
Optional
orderItems Order Items string
JSON array of order items. Each item: {itemNumber, referenceIdentifier, sku, quantity, vpn, comment}. Example: [{"itemNumber":"ABC123","sku":"SKU1","quantity":2,"vpn":"VPN1"}].
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
universal_api-create-distributor-order
Version
0.0.2
App
Universal API
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes