Mews ACTION
Create Order
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Mews 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: "mews-create-order",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
mews: { authProvisionId: "apn_xxxxxxx" },
accountType: "Account Type",
accountId: "Account ID",
},
})
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": "mews-create-order",
"configured_props": {
"mews": { "authProvisionId": "apn_xxxxxxx" },
"accountType": "Account Type",
"accountId": "Account ID"
}
}'// 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": "mews",
},
},
},
)
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: "mews-create-order",
arguments: {
accountType: "Account Type",
accountId: "Account ID",
},
})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 |
|---|---|---|
accountType Account Type | string | Type of account to be charged Required |
accountId Account ID | string | Identifier of the Customer or Company to be charged. Company billing may not be enabled for your integration. Required Dynamic |
serviceId Service ID | string | Identifier of the Service to be ordered. Required Dynamic |
billId Bill ID | string | Identifier of the Bill to which the created order will be assigned. The bill needs to be issued to the same account as the order. Optional Dynamic |
linkedReservationId Linked Reservation ID | string | Identifier of the Reservation to which the created order will be linked. Optional Dynamic |
consumptionUtc Consumption (UTC) | string | Date and time of the order consumption in UTC timezone in ISO 8601 format. If not specified, current date and time is used. Optional |
notes Notes | string | Additional notes of the order. Optional |
productOrders Product Orders | string[] | Array of product orders in JSON format. Each order must include: Required:
Optional:
Note: Either GrossValue or NetValue must be specified in amount objects, but not both. For products with charging Once and PerPerson, StartUtc and EndUtc must be set to the same value. Example: Optional |
items Items | string[] | Array of custom items in JSON format. Each item must include: Required:
Optional:
Note: Either GrossValue or NetValue must be specified in UnitAmount, but not both. Example: 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
- mews-create-order
- Version
- 0.0.3
- App
- Mews
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗