View as Markdown
Xero Accounting icon

Xero Accounting ACTION

Update Contact

Updates a contact given its identifier.
  • Action
  • Writes data
  • Destructive
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Xero Accounting account once, then configure and run Update Contact 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: "xero_accounting_api-xero-accounting-update-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xero_accounting_api: { authProvisionId: "apn_xxxxxxx" },
    tenantId: "Tenant ID",
    contactId: "Contact 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 Contact inputs
Property Type Description
tenantId Tenant ID string
Select an organization tenant to use, or provide a tenant ID
Required Dynamic
contactId Contact ID string
Contact identifier of the contact to update
Required Dynamic
name Name string
Full name of contact/organisation (max length = 255). The following is required to create a contact.
Optional
contactNumber Contact Number string
This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.
Optional
accountNumber Account Number string
A user defined account number. This can be updated via the API and the Xero UI (max length = 50).
Optional
contactStatus Contact Status string
Current status of a contact - see contact status types
Optional
firstName First Name string
First name of contact person (max length = 255)
Optional
lastName Last Name string
Last name of contact person (max length = 255)
Optional
emailAddress Email Address string
Email address of contact person (umlauts not supported) (max length = 255)
Optional
skypeUserName Skype User Name string
Skype user name of contact
Optional
contactPersons Contact Persons any
Optional
bankAccountDetails Bank Account Details string
Bank account number of contact
Optional
taxNumber Tax Number string
Tax number of contact - this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)
Optional
accountReceivableTaxType Account Receivable Tax Type string
Default tax type used for contact on AP invoices
Optional
accountPayableType Account Payable Type string
Store certain address types for a contact - see address types
Optional
addresses Addresses any
Store certain address types for a contact - see address types
Optional
phones Phones any
Store certain phone types for a contact - see phone types
Optional
isSupplier Is Supplier boolean
true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts payable invoice is generated against this contact.
Optional
isCustomer Is Customer boolean
true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST - it is automatically set when an accounts receivable invoice is generated against this contact.
Optional
defaultCurrency Default Currency string
Default currency for raising invoices against contact
Optional
xeroNetworkKey Xero Network Key string
Store XeroNetworkKey for contacts
Optional
salesDefaultAccountCode Sales Default Account Code string
The default sales account code for contacts
Optional
purchasesDefaultAccountCode Purchases Default Account Code string
The default purchases account code for contacts
Optional
salesTrackingCategories Sales Tracking Categories string
The default sales tracking categories for contacts
Optional
purchasesTrackingCategories Purchases Tracking Categories string
The default purchases tracking categories for contacts
Optional
trackingCategoryName Tracking Category Name string
The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
Optional
trackingOptionName Tracking Option Name string
The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
Optional
paymentTermsBillDay Payment Terms Bill Day integer
The default payment terms bill day
Optional
paymentTermsBillType Payment Terms Bill Type string
The default payment terms bill type
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
xero_accounting_api-xero-accounting-update-contact
Version
0.1.5
App
Xero Accounting
Authentication
OAuth
Read-only
No
Destructive
Yes
Open world
Yes