Allows you to update OR create one or more contacts in a Xero organisation

POST {{baseUrl}}/Contacts?summarizeErrors=false

Request Params

KeyDatatypeRequiredDescription
summarizeErrorsbooleanIf false return 200 OK and mix of successfully created objects and any with validation errors

Request Body

{"Contacts"=>[{"ContactID"=>"<uuid>", "ContactNumber"=>"<string>", "AccountNumber"=>"<string>", "ContactStatus"=>"<string>", "Name"=>"<string>", "FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "SkypeUserName"=>"<string>", "ContactPersons"=>[{"FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "IncludeInEmails"=>"<boolean>"}, {"FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "IncludeInEmails"=>"<boolean>"}], "BankAccountDetails"=>"<string>", "TaxNumber"=>"<string>", "AccountsReceivableTaxType"=>"<string>", "AccountsPayableTaxType"=>"<string>", "Addresses"=>[{"AddressType"=>"<string>", "AddressLine1"=>"<string>", "AddressLine2"=>"<string>", "AddressLine3"=>"<string>", "AddressLine4"=>"<string>", "City"=>"<string>", "Region"=>"<string>", "PostalCode"=>"<string>", "Country"=>"<string>", "AttentionTo"=>"<string>"}, {"AddressType"=>"<string>", "AddressLine1"=>"<string>", "AddressLine2"=>"<string>", "AddressLine3"=>"<string>", "AddressLine4"=>"<string>", "City"=>"<string>", "Region"=>"<string>", "PostalCode"=>"<string>", "Country"=>"<string>", "AttentionTo"=>"<string>"}], "Phones"=>[{"PhoneType"=>"<string>", "PhoneNumber"=>"<string>", "PhoneAreaCode"=>"<string>", "PhoneCountryCode"=>"<string>"}, {"PhoneType"=>"<string>", "PhoneNumber"=>"<string>", "PhoneAreaCode"=>"<string>", "PhoneCountryCode"=>"<string>"}], "IsSupplier"=>"<boolean>", "IsCustomer"=>"<boolean>", "DefaultCurrency"=>"<string>", "XeroNetworkKey"=>"<string>", "SalesDefaultAccountCode"=>"<string>", "PurchasesDefaultAccountCode"=>"<string>", "SalesTrackingCategories"=>[{"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}, {"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}], "PurchasesTrackingCategories"=>[{"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}, {"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}], "TrackingCategoryName"=>"<string>", "TrackingCategoryOption"=>"<string>", "PaymentTerms"=>{"Bills"=>{"Day"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Type"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "Sales"=>{"Day"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Type"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}}, "ContactGroups"=>[{"Name"=>"<string>", "Status"=>"<string>", "ContactGroupID"=>"<uuid>", "Contacts"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, {"Name"=>"<string>", "Status"=>"<string>", "ContactGroupID"=>"<uuid>", "Contacts"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}], "BrandingTheme"=>{"BrandingThemeID"=>"<uuid>", "Name"=>"<string>", "LogoUrl"=>"<string>", "Type"=>"<string>", "SortOrder"=>"<integer>"}, "BatchPayments"=>{"BankAccountNumber"=>"<string>", "BankAccountName"=>"<string>", "Details"=>"<string>", "Code"=>"<string>", "Reference"=>"<string>"}, "Balances"=>{"AccountsReceivable"=>{"Outstanding"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Overdue"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "AccountsPayable"=>{"Outstanding"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Overdue"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}}, "Attachments"=>[{"AttachmentID"=>"<uuid>", "FileName"=>"<string>", "Url"=>"<string>", "MimeType"=>"<string>", "ContentLength"=>"<integer>", "IncludeOnline"=>"<boolean>"}, {"AttachmentID"=>"<uuid>", "FileName"=>"<string>", "Url"=>"<string>", "MimeType"=>"<string>", "ContentLength"=>"<integer>", "IncludeOnline"=>"<boolean>"}], "HasAttachments"=>"false", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}], "HasValidationErrors"=>"false", "StatusAttributeString"=>"<string>"}, {"ContactID"=>"<uuid>", "ContactNumber"=>"<string>", "AccountNumber"=>"<string>", "ContactStatus"=>"<string>", "Name"=>"<string>", "FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "SkypeUserName"=>"<string>", "ContactPersons"=>[{"FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "IncludeInEmails"=>"<boolean>"}, {"FirstName"=>"<string>", "LastName"=>"<string>", "EmailAddress"=>"<string>", "IncludeInEmails"=>"<boolean>"}], "BankAccountDetails"=>"<string>", "TaxNumber"=>"<string>", "AccountsReceivableTaxType"=>"<string>", "AccountsPayableTaxType"=>"<string>", "Addresses"=>[{"AddressType"=>"<string>", "AddressLine1"=>"<string>", "AddressLine2"=>"<string>", "AddressLine3"=>"<string>", "AddressLine4"=>"<string>", "City"=>"<string>", "Region"=>"<string>", "PostalCode"=>"<string>", "Country"=>"<string>", "AttentionTo"=>"<string>"}, {"AddressType"=>"<string>", "AddressLine1"=>"<string>", "AddressLine2"=>"<string>", "AddressLine3"=>"<string>", "AddressLine4"=>"<string>", "City"=>"<string>", "Region"=>"<string>", "PostalCode"=>"<string>", "Country"=>"<string>", "AttentionTo"=>"<string>"}], "Phones"=>[{"PhoneType"=>"<string>", "PhoneNumber"=>"<string>", "PhoneAreaCode"=>"<string>", "PhoneCountryCode"=>"<string>"}, {"PhoneType"=>"<string>", "PhoneNumber"=>"<string>", "PhoneAreaCode"=>"<string>", "PhoneCountryCode"=>"<string>"}], "IsSupplier"=>"<boolean>", "IsCustomer"=>"<boolean>", "DefaultCurrency"=>"<string>", "XeroNetworkKey"=>"<string>", "SalesDefaultAccountCode"=>"<string>", "PurchasesDefaultAccountCode"=>"<string>", "SalesTrackingCategories"=>[{"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}, {"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}], "PurchasesTrackingCategories"=>[{"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}, {"TrackingCategoryName"=>"<string>", "TrackingOptionName"=>"<string>"}], "TrackingCategoryName"=>"<string>", "TrackingCategoryOption"=>"<string>", "PaymentTerms"=>{"Bills"=>{"Day"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Type"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "Sales"=>{"Day"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Type"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}}, "ContactGroups"=>[{"Name"=>"<string>", "Status"=>"<string>", "ContactGroupID"=>"<uuid>", "Contacts"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, {"Name"=>"<string>", "Status"=>"<string>", "ContactGroupID"=>"<uuid>", "Contacts"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}], "BrandingTheme"=>{"BrandingThemeID"=>"<uuid>", "Name"=>"<string>", "LogoUrl"=>"<string>", "Type"=>"<string>", "SortOrder"=>"<integer>"}, "BatchPayments"=>{"BankAccountNumber"=>"<string>", "BankAccountName"=>"<string>", "Details"=>"<string>", "Code"=>"<string>", "Reference"=>"<string>"}, "Balances"=>{"AccountsReceivable"=>{"Outstanding"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Overdue"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "AccountsPayable"=>{"Outstanding"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Overdue"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}}, "Attachments"=>[{"AttachmentID"=>"<uuid>", "FileName"=>"<string>", "Url"=>"<string>", "MimeType"=>"<string>", "ContentLength"=>"<integer>", "IncludeOnline"=>"<boolean>"}, {"AttachmentID"=>"<uuid>", "FileName"=>"<string>", "Url"=>"<string>", "MimeType"=>"<string>", "ContentLength"=>"<integer>", "IncludeOnline"=>"<boolean>"}], "HasAttachments"=>"false", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}], "HasValidationErrors"=>"false", "StatusAttributeString"=>"<string>"}]}

HEADERS

KeyDatatypeRequiredDescription
xero-tenant-idstring(Required) Xero identifier for Tenant
Content-Typestring

RESPONSES

status: OK

{&quot;Id&quot;:&quot;e997d6d7-6dad-4458-beb8-d9c1bf7f2edf&quot;,&quot;Status&quot;:&quot;OK&quot;,&quot;ProviderName&quot;:&quot;Xero API Partner&quot;,&quot;DateTimeUTC&quot;:&quot;/Date(1551399321121)/&quot;,&quot;Contacts&quot;:[{&quot;ContactID&quot;:&quot;00000000-0000-0000-0000-000000000000&quot;,&quot;ContactStatus&quot;:&quot;ACTIVE&quot;,&quot;Name&quot;:&quot;Bruce Banner&quot;,&quot;EmailAddress&quot;:&quot;bruce@banner.com&quot;,&quot;BankAccountDetails&quot;:&quot;&quot;,&quot;Addresses&quot;:[{&quot;AddressType&quot;:&quot;STREET&quot;,&quot;City&quot;:&quot;&quot;,&quot;Region&quot;:&quot;&quot;,&quot;PostalCode&quot;:&quot;&quot;,&quot;Country&quot;:&quot;&quot;},{&quot;AddressType&quot;:&quot;POBOX&quot;,&quot;City&quot;:&quot;&quot;,&quot;Region&quot;:&quot;&quot;,&quot;PostalCode&quot;:&quot;&quot;,&quot;Country&quot;:&quot;&quot;}],&quot;Phones&quot;:[{&quot;PhoneType&quot;:&quot;DEFAULT&quot;,&quot;PhoneNumber&quot;:&quot;&quot;,&quot;PhoneAreaCode&quot;:&quot;&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;DDI&quot;,&quot;PhoneNumber&quot;:&quot;&quot;,&quot;PhoneAreaCode&quot;:&quot;&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;FAX&quot;,&quot;PhoneNumber&quot;:&quot;&quot;,&quot;PhoneAreaCode&quot;:&quot;&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;},{&quot;PhoneType&quot;:&quot;MOBILE&quot;,&quot;PhoneNumber&quot;:&quot;555-1212&quot;,&quot;PhoneAreaCode&quot;:&quot;415&quot;,&quot;PhoneCountryCode&quot;:&quot;&quot;}],&quot;UpdatedDateUTC&quot;:&quot;/Date(1551399321043+0000)/&quot;,&quot;ContactGroups&quot;:[],&quot;IsSupplier&quot;:false,&quot;IsCustomer&quot;:false,&quot;SalesTrackingCategories&quot;:[],&quot;PurchasesTrackingCategories&quot;:[],&quot;PaymentTerms&quot;:{&quot;Bills&quot;:{&quot;Day&quot;:15,&quot;Type&quot;:&quot;OFCURRENTMONTH&quot;},&quot;Sales&quot;:{&quot;Day&quot;:10,&quot;Type&quot;:&quot;DAYSAFTERBILLMONTH&quot;}},&quot;ContactPersons&quot;:[],&quot;HasValidationErrors&quot;:false}]}