View as Markdown
Returnista icon

Returnista ACTION

Get Consumer Purchases

Gets the purchase history for a consumer by their consumer ID. Useful for support workflows to understand what a consumer has purchased before they initiated a return. To find a consumer ID, use Get Return Orders with expand: ["consumer"] on a related return order — the consumer object will include the ID. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Returnista account once, then configure and run Get Consumer Purchases 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: "returnista-get-consumer-purchases",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    returnista: { authProvisionId: "apn_xxxxxxx" },
    consumerId: "Consumer 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.

Get Consumer Purchases inputs
Property Type Description
consumerId Consumer ID string
The unique identifier of the consumer in Returnista. To find a consumer ID, use Get Return Orders or Get Return Order — the consumer ID is included directly in the response.
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
returnista-get-consumer-purchases
Version
0.0.3
App
Returnista
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes