View as Markdown
SureCart icon

SureCart ACTION

Update Line Item

Update an existing line item. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's SureCart account once, then configure and run Update Line Item 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: "surecart-update-line-item",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    surecart: { authProvisionId: "apn_xxxxxxx" },
    lineItemId: "Line Item ID",
    consolidate: true,
  },
})

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.

Update Line Item inputs
Property Type Description
lineItemId Line Item ID string
The unique identifier of the line item. Use List Line Items to retrieve a list of available line items.
Required
consolidate Consolidate boolean
Set to true to merge this line item into an existing line item for the same price on the same checkout.
Optional
quantity Quantity integer
Number of units being purchased. Example: 2
Optional
price Price ID string
UUID of the price to assign to this line item. Use List Prices to find price IDs. Example: price_abc123
Optional
checkout Checkout ID string
The unique identifier of the checkout. Use List Checkouts to retrieve a list of available checkouts.
Required
adHocAmount Ad Hoc Amount integer
Custom amount in cents for this line item when the associated price has ad_hoc=true. Example: 5000 for $50.00
Optional
note Note string
Custom note for this line item, e.g. special instructions or context. Example: Gift wrap requested
Optional
bump Bump ID string
UUID of the order bump to associate with this line item. Example: bump_abc123
Optional
upsell Upsell ID string
UUID of the upsell to associate with this line item. Example: upsell_abc123
Optional
variant Variant ID string
UUID of the product variant. Example: var_abc123
Optional
bundleComponentVariants Bundle Component Variants object
Map of bundle component product UUIDs to selected variant UUIDs. Example: { "prod_abc123": "var_def456" }
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
surecart-update-line-item
Version
0.0.2
App
SureCart
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes