View as Markdown
SureCart icon

SureCart ACTION

Update Variant

Update an existing variant. 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 Variant 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-variant",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    surecart: { authProvisionId: "apn_xxxxxxx" },
    variantId: "Variant ID",
    product: "Product ID",
  },
})

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 Variant inputs
Property Type Description
variantId Variant ID string
The unique identifier of the variant. Use List Variants to retrieve a list of available variants.
Required
product Product ID string
The UUID of the product this variant belongs to. Use List Products to find product IDs.
Optional
option1 Option 1 string
The value for the first variant option. Example: Red
Optional
option2 Option 2 string
The value for the second variant option.
Optional
option3 Option 3 string
The value for the third variant option.
Optional
amount Amount integer
Amount in cents to charge for this variant. If empty, the regular price amount is used. Example: 1999
Optional
sku SKU string
Stock keeping unit for this variant.
Optional
position Position integer
Ordering position when displayed to customers.
Optional
purchaseLimit Purchase Limit integer
Max times this variant can be purchased by a customer.
Optional
stockEnabled Stock Enabled boolean
Set to true to track stock for this variant.
Optional
stockAdjustment Stock Adjustment integer
Amount to adjust the stock by (positive or negative).
Optional
shippingEnabled Shipping Enabled boolean
Set to true to require a shipping address at checkout.
Optional
taxEnabled Tax Enabled boolean
Set to true to make this variant taxable.
Optional
taxCategory Tax Category string
The tax category for this variant.
Optional
allowOutOfStockPurchases Allow Out Of Stock Purchases boolean
Set to true to allow purchases when stock runs out.
Optional
autoFulfillEnabled Auto Fulfill Enabled boolean
Set to true to auto-fulfill this variant on purchase.
Optional
downloadsEnabled Downloads Enabled boolean
Set to true to enable downloads for this variant.
Optional
licenseActivationLimit License Activation Limit integer
Max activations allowed per license.
Optional
image Image ID string
The UUID of the media image for this variant. Use List Media to find media IDs.
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-variant
Version
0.0.1
App
SureCart
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes