POST /Contacts/{ContactID}

Servers

Path parameters

Name Type Required Description
ContactID String Yes

Unique identifier for a Contact

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

xero-tenant-id String Yes

Xero identifier for Tenant

Idempotency-Key String No

This allows you to safely retry requests without the risk of duplicate processing. 128 character max.

Request body fields

Name Type Required Description
pagination Object No
pagination.page Integer No
pagination.itemCount Integer No
pagination.pageCount Integer No
pagination.pageSize Integer No
Warnings[] Array No

Displays array of warning messages from the API

Warnings[].Message String No

Validation error message

Contacts[] Array No
Contacts[].BankAccountDetails String No

Bank account number of contact

Contacts[].Website String No

Website address for contact (read only)

Contacts[].Name String No

Full name of contact/organisation (max length = 255)

Contacts[].SalesTrackingCategories[] Array No

The default sales tracking categories for contacts

Contacts[].SalesTrackingCategories[].TrackingOptionName String No

The default purchase tracking category name for contacts

Contacts[].SalesTrackingCategories[].TrackingCategoryName String No

The default sales tracking category name for contacts

Contacts[].SalesDefaultLineAmountType String No

The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.

Possible values:

  • "INCLUSIVE"
  • "NONE"
  • "EXCLUSIVE"
Contacts[].TrackingCategoryOption String No

The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories

Contacts[].TaxNumber String No

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)

Contacts[].TrackingCategoryName String No

The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories

Contacts[].LastName String No

Last name of contact person (max length = 255)

Contacts[].IsSupplier Boolean No

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.

Contacts[].PurchasesTrackingCategories[] Array No

The default purchases tracking categories for contacts

Contacts[].PurchasesTrackingCategories[].TrackingOptionName String No

The default purchase tracking category name for contacts

Contacts[].PurchasesTrackingCategories[].TrackingCategoryName String No

The default sales tracking category name for contacts

Contacts[].UpdatedDateUTC String No

UTC timestamp of last update to contact

Contacts[].BrandingTheme Object No
Contacts[].BrandingTheme.Name String No

Name of branding theme

Contacts[].BrandingTheme.BrandingThemeID String No

Xero identifier

Contacts[].BrandingTheme.Type String No

Always INVOICE

Possible values:

  • "INVOICE"
Contacts[].BrandingTheme.LogoUrl String No

The location of the image file used as the logo on this branding theme

Contacts[].BrandingTheme.SortOrder Integer No

Integer – ranked order of branding theme. The default branding theme has a value of 0

Contacts[].BrandingTheme.CreatedDateUTC String No

UTC timestamp of creation date of branding theme

Contacts[].IsCustomer Boolean No

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.

Contacts[].PurchasesDefaultLineAmountType String No

The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.

Possible values:

  • "INCLUSIVE"
  • "NONE"
  • "EXCLUSIVE"
Contacts[].Attachments[] Array No

Displays array of attachments from the API

Contacts[].Attachments[].ContentLength Integer No

Length of the file content

Contacts[].Attachments[].IncludeOnline Boolean No

Include the file with the online invoice

Contacts[].Attachments[].AttachmentID String No

Unique ID for the file

Contacts[].Attachments[].MimeType String No

Type of file

Contacts[].Attachments[].Url String No

URL to the file on xero.com

Contacts[].Attachments[].FileName String No

Name of the file

Contacts[].PurchasesDefaultAccountCode String No

The default purchases account code for contacts

Contacts[].ContactID String No

Xero identifier

Contacts[].AccountsPayableTaxType String No

The tax type from TaxRates

Contacts[].ContactStatus String No

Current status of a contact – see contact status types

Possible values:

  • "ARCHIVED"
  • "ACTIVE"
  • "GDPRREQUEST"
Contacts[].Addresses[] Array No

Store certain address types for a contact – see address types

Contacts[].Addresses[].City String No

max length = 255

Contacts[].Addresses[].AddressType String No

define the type of address

Possible values:

  • "STREET"
  • "POBOX"
Contacts[].Addresses[].AttentionTo String No

max length = 255

Contacts[].Addresses[].AddressLine2 String No

max length = 500

Contacts[].Addresses[].Region String No

max length = 255

Contacts[].Addresses[].Country String No

max length = 50, [A-Z], [a-z] only

Contacts[].Addresses[].AddressLine1 String No

max length = 500

Contacts[].Addresses[].AddressLine4 String No

max length = 500

Contacts[].Addresses[].AddressLine3 String No

max length = 500

Contacts[].Addresses[].PostalCode String No

max length = 50

Contacts[].StatusAttributeString String No

Status of object

Contacts[].CompanyNumber String No

Company registration number (max length = 50)

Contacts[].Phones[] Array No

Store certain phone types for a contact – see phone types

Contacts[].Phones[].PhoneType String No

Possible values:

  • "DEFAULT"
  • "OFFICE"
  • "DDI"
  • "MOBILE"
  • "FAX"
Contacts[].Phones[].PhoneNumber String No

max length = 50

Contacts[].Phones[].PhoneAreaCode String No

max length = 10

Contacts[].Phones[].PhoneCountryCode String No

max length = 20

Contacts[].BatchPayments No

Bank details for use on a batch payment stored with each contact

Contacts[].FirstName String No

First name of contact person (max length = 255)

Contacts[].SalesDefaultAccountCode String No

The default sales account code for contacts

Contacts[].ContactNumber String No

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.

Contacts[].AccountsReceivableTaxType String No

The tax type from TaxRates

Contacts[].DefaultCurrency String No

3 letter alpha code for the currency – see list of currency codes

Possible values:

  • "ISK"
  • "JMD"
  • "LTL"
  • "SVC"
  • "SAR"
  • "EEK"
  • "TTD"
  • "SBD"
  • "SHP"
  • "GBP"
  • "TRY"
  • "MOP"
  • "INR"
  • "MAD"
  • "CUP"
  • "CLF"
  • "SRD"
  • "SZL"
  • "IRR"
  • "CHF"
  • "EUR"
  • "KZT"
  • "ALL"
  • "MZN"
  • "CDF"
  • "BZD"
  • "KES"
  • "AOA"
  • "NGN"
  • "SEK"
  • "BND"
  • "UYU"
  • "BRL"
  • "YER"
  • "ANG"
  • "BYR"
  • "MRO"
  • "DJF"
  • "LSL"
  • "BBD"
  • "MGA"
  • "VND"
  • "DOP"
  • "TJS"
  • "FJD"
  • "BGN"
  • "TWD"
  • "QAR"
  • "VES"
  • "CNY"
  • "AUD"
  • "ZMW"
  • "WST"
  • "MDL"
  • "KHR"
  • "NZD"
  • "AMD"
  • "AZN"
  • "TZS"
  • "GIP"
  • "AED"
  • "AFN"
  • "DZD"
  • "PKR"
  • "KYD"
  • "AWG"
  • "BSD"
  • "PEN"
  • "XAF"
  • "NAD"
  • "ZWD"
  • "BTN"
  • "KRW"
  • "NPR"
  • "FKP"
  • "TND"
  • "LVL"
  • "MWK"
  • "JOD"
  • "LRD"
  • "RSD"
  • "SCR"
  • "HUF"
  • "IDR"
  • "LAK"
  • "UAH"
  • "ZAR"
  • "OMR"
  • "PGK"
  • "SLL"
  • "MVR"
  • "USD"
  • "MXV"
  • "MKD"
  • "COP"
  • "CAD"
  • "KMF"
  • "MXN"
  • "PYG"
  • "XCD"
  • "STD"
  • "IQD"
  • "TOP"
  • "VEF"
  • "VUV"
  • "SOS"
  • "CVE"
  • "CUC"
  • "KGS"
  • "TMT"
  • "THB"
  • "BOB"
  • "UZS"
  • "BYN"
  • "SKK"
  • "ILS"
  • "PLN"
  • "RON"
  • "BHD"
  • "BIF"
  • "SLE"
  • "XPF"
  • "ARS"
  • "GTQ"
  • "RUB"
  • "HKD"
  • "ZMK"
  • "RWF"
  • "BDT"
  • "ETB"
  • "LYD"
  • "JPY"
  • "SGD"
  • "STN"
  • "MNT"
  • "NIO"
  • "GEL"
  • "MUR"
  • "NOK"
  • "ERN"
  • "SYP"
  • "MYR"
  • "DKK"
  • "HRK"
  • "CLP"
  • "GNF"
  • "GMD"
  • "BAM"
  • "HTG"
  • "LBP"
  • "PHP"
  • "EGP"
  • "SDG"
  • "CRC"
  • "CZK"
  • "KWD"
  • "KPW"
  • "GHS"
  • "GYD"
  • "LKR"
  • "BMD"
  • "BWP"
  • "MRU"
  • "PAB"
  • "UGX"
  • "MMK"
  • "XOF"
  • "HNL"
Contacts[].HasValidationErrors Boolean No

A boolean to indicate if a contact has an validation errors

Default value: false

Contacts[].AccountNumber String No

A user defined account number. This can be updated via the API and the Xero UI (max length = 50)

Contacts[].Balances Object No

The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only)

Contacts[].Balances.AccountsReceivable Object No
Contacts[].Balances.AccountsReceivable.Overdue Number No
Contacts[].Balances.AccountsReceivable.Outstanding Number No
Contacts[].Balances.AccountsPayable Object No
Contacts[].Balances.AccountsPayable.Overdue Number No
Contacts[].Balances.AccountsPayable.Outstanding Number No
Contacts[].XeroNetworkKey String No

Store XeroNetworkKey for contacts.

Contacts[].Discount Number No

The default discount rate for the contact (read only)

Contacts[].MergedToContactID String No

ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber.

Contacts[].ValidationErrors[] Array No

Displays validation errors returned from the API

Contacts[].ValidationErrors[].Message String No

Validation error message

Contacts[].EmailAddress String No

Email address of contact person (umlauts not supported) (max length = 255)

Contacts[].HasAttachments Boolean No

A boolean to indicate if a contact has an attachment

Default value: false

Contacts[].PaymentTerms Object No
Contacts[].PaymentTerms.Bills Object No
Contacts[].PaymentTerms.Bills.Day Integer No

Day of Month (0-31)

Contacts[].PaymentTerms.Bills.Type String No

Possible values:

  • "DAYSAFTERBILLMONTH"
  • "OFCURRENTMONTH"
  • "DAYSAFTERBILLDATE"
  • "OFFOLLOWINGMONTH"
Contacts[].PaymentTerms.Sales Object No
Contacts[].PaymentTerms.Sales.Day Integer No

Day of Month (0-31)

Contacts[].PaymentTerms.Sales.Type String No

Possible values:

  • "DAYSAFTERBILLMONTH"
  • "OFCURRENTMONTH"
  • "DAYSAFTERBILLDATE"
  • "OFFOLLOWINGMONTH"
Contacts[].ContactGroups[] Array No

Displays which contact groups a contact is included in

Contacts[].ContactGroups[].Name String No

The Name of the contact group. Required when creating a new contact group

Contacts[].ContactGroups[].Status String No

The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs.

Possible values:

  • "DELETED"
  • "ACTIVE"
Contacts[].ContactGroups[].ContactGroupID String No

The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9

Contacts[].ContactGroups[].Contacts[] Array No

The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL.

Contacts[].ContactPersons[] Array No

See contact persons

Contacts[].ContactPersons[].IncludeInEmails Boolean No

boolean to indicate whether contact should be included on emails with invoices etc.

Contacts[].ContactPersons[].EmailAddress String No

Email address of person

Contacts[].ContactPersons[].LastName String No

Last name of person

Contacts[].ContactPersons[].FirstName String No

First name of person

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.