Zenfulfillment ACTION
Create or Retrieve Return Label
Create or retrieve a Return Label for a specific Order. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Zenfulfillment account once, then configure and run Create or Retrieve Return Label 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: "zenfulfillment-create-or-retrieve-return-label",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
zenfulfillment: { authProvisionId: "apn_xxxxxxx" },
orderId: "Order ID",
carrier: "Carrier",
},
})
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": "zenfulfillment-create-or-retrieve-return-label",
"configured_props": {
"zenfulfillment": { "authProvisionId": "apn_xxxxxxx" },
"orderId": "Order ID",
"carrier": "Carrier"
}
}'// 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": "zenfulfillment",
},
},
},
)
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: "zenfulfillment-create-or-retrieve-return-label",
arguments: {
orderId: "Order ID",
carrier: "Carrier",
},
})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 |
|---|---|---|
orderId Order ID | string | The ID of the order Required Dynamic |
carrier Carrier | string | Shipping carrier for the return label. Must be one of the supported carriers: DHL, HERMES, or EXPORTO. Required |
firstName First Name | string | First name of the return recipient (e.g., Jane). Required |
lastName Last Name | string | Last name of the return recipient (e.g., Doe). Optional |
city City | string | City of the return recipient's address (e.g., Berlin). Required |
company Company | string | Company name at the return address, if applicable (e.g., Acme GmbH). Optional |
country Country | string | ISO 3166-1 alpha-2 country code for the return recipient's address (e.g., DE for Germany, GB for the United Kingdom, US for the United States). Required |
zip Zip | string | Postal/ZIP code for the return recipient's address. Format varies by country (e.g., 12345 for Germany, SW1A 1AA for the UK, 10001 for the US). Required |
region Region | string | State, province, or region of the return recipient's address (e.g., Bavaria, England, NY). Required |
phone Phone | string | Phone number of the return recipient in E.164 format, including country code (e.g., +491701234567 for a German number, +441234567890 for a UK number). Optional |
street Street | string | Street name of the return recipient's address, without the house number (e.g., Hauptstraße). Required |
streetNumber Street Number | string | House or building number for the return recipient's address. May be numeric or alphanumeric (e.g., 12, 12A, 4B). Required |
apartment Apartment | string | Apartment, suite, or floor number at the return address, if applicable (e.g., Apt 3, Floor 2). 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
- zenfulfillment-create-or-retrieve-return-label
- Version
- 0.0.2
- App
- Zenfulfillment
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗