Allows you to create one or more spend or receive money transaction
PUT {{baseUrl}}/BankTransactions?summarizeErrors=false&unitdp=<integer>
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
summarizeErrors | boolean | If false return 200 OK and mix of successfully created objects and any with validation errors | |
unitdp | string | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts |
Request Body
{"BankTransactions"=>[{"Type"=>"<string>", "LineItems"=>[{"LineItemID"=>"<uuid>", "Description"=>"<string>", "Quantity"=>"<double>", "UnitAmount"=>"<double>", "ItemCode"=>"<string>", "AccountCode"=>"<string>", "TaxType"=>"<string>", "TaxAmount"=>"<double>", "LineAmount"=>"<double>", "Tracking"=>[{"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "DiscountRate"=>"<double>", "DiscountAmount"=>"<double>", "RepeatingInvoiceID"=>"<uuid>"}, {"LineItemID"=>"<uuid>", "Description"=>"<string>", "Quantity"=>"<double>", "UnitAmount"=>"<double>", "ItemCode"=>"<string>", "AccountCode"=>"<string>", "TaxType"=>"<string>", "TaxAmount"=>"<double>", "LineAmount"=>"<double>", "Tracking"=>[{"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "DiscountRate"=>"<double>", "DiscountAmount"=>"<double>", "RepeatingInvoiceID"=>"<uuid>"}], "BankAccount"=>{"Code"=>"<string>", "Name"=>"<string>", "AccountID"=>"<uuid>", "Type"=>"<string>", "BankAccountNumber"=>"<string>", "Status"=>"<string>", "Description"=>"<string>", "BankAccountType"=>"<string>", "CurrencyCode"=>"<string>", "TaxType"=>"<string>", "EnablePaymentsToAccount"=>"<boolean>", "ShowInExpenseClaims"=>"<boolean>", "ReportingCode"=>"<string>", "AddToWatchlist"=>"<boolean>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, "Contact"=>{"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>"}, "IsReconciled"=>"<boolean>", "Date"=>"<string>", "Reference"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Url"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>"<string>", "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "BankTransactionID"=>"<uuid>", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, {"Type"=>"<string>", "LineItems"=>[{"LineItemID"=>"<uuid>", "Description"=>"<string>", "Quantity"=>"<double>", "UnitAmount"=>"<double>", "ItemCode"=>"<string>", "AccountCode"=>"<string>", "TaxType"=>"<string>", "TaxAmount"=>"<double>", "LineAmount"=>"<double>", "Tracking"=>[{"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "DiscountRate"=>"<double>", "DiscountAmount"=>"<double>", "RepeatingInvoiceID"=>"<uuid>"}, {"LineItemID"=>"<uuid>", "Description"=>"<string>", "Quantity"=>"<double>", "UnitAmount"=>"<double>", "ItemCode"=>"<string>", "AccountCode"=>"<string>", "TaxType"=>"<string>", "TaxAmount"=>"<double>", "LineAmount"=>"<double>", "Tracking"=>[{"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, {"TrackingCategoryID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "TrackingOptionID"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "Option"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}], "DiscountRate"=>"<double>", "DiscountAmount"=>"<double>", "RepeatingInvoiceID"=>"<uuid>"}], "BankAccount"=>{"Code"=>"<string>", "Name"=>"<string>", "AccountID"=>"<uuid>", "Type"=>"<string>", "BankAccountNumber"=>"<string>", "Status"=>"<string>", "Description"=>"<string>", "BankAccountType"=>"<string>", "CurrencyCode"=>"<string>", "TaxType"=>"<string>", "EnablePaymentsToAccount"=>"<boolean>", "ShowInExpenseClaims"=>"<boolean>", "ReportingCode"=>"<string>", "AddToWatchlist"=>"<boolean>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, "Contact"=>{"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>"}, "IsReconciled"=>"<boolean>", "Date"=>"<string>", "Reference"=>"<string>", "CurrencyCode"=>"<string>", "CurrencyRate"=>"<double>", "Url"=>"<string>", "Status"=>"<string>", "LineAmountTypes"=>"<string>", "SubTotal"=>"<double>", "TotalTax"=>"<double>", "Total"=>"<double>", "BankTransactionID"=>"<uuid>", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
xero-tenant-id | string | (Required) Xero identifier for Tenant | |
Content-Type | string |
RESPONSES
status: OK
{"Id":"5bc1d776-3c7f-4fe8-9b2d-09e747077a88","Status":"OK","ProviderName":"Xero API Partner","DateTimeUTC":"/Date(1551213568047)/","BankTransactions":[{"BankTransactionID":"1289c190-e46d-434b-9628-463ffdb52f00","BankAccount":{"AccountID":"6f7594f2-f059-4d56-9e67-47ac9733bfe9","Code":"088","Name":"Business Wells Fargo"},"Type":"SPEND","Reference":"","IsReconciled":false,"CurrencyRate":1.0,"Contact":{"ContactID":"5cc8cf28-567e-4d43-b287-687cfcaec47c","ContactStatus":"ACTIVE","Name":"Katherine Warren","FirstName":"Katherine","LastName":"Warren","EmailAddress":"kat.warren@clampett.com","BankAccountDetails":"","Addresses":[{"AddressType":"STREET","City":"","Region":"","PostalCode":"","Country":""},{"AddressType":"POBOX","AddressLine1":"","AddressLine2":"","AddressLine3":"","AddressLine4":"","City":"Palo Alto","Region":"CA","PostalCode":"94020","Country":"United States"}],"Phones":[{"PhoneType":"DEFAULT","PhoneNumber":"847-1294","PhoneAreaCode":"(626)","PhoneCountryCode":""},{"PhoneType":"DDI","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"FAX","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""},{"PhoneType":"MOBILE","PhoneNumber":"","PhoneAreaCode":"","PhoneCountryCode":""}],"UpdatedDateUTC":"/Date(1503348544227+0000)/","ContactGroups":[],"ContactPersons":[],"HasValidationErrors":false},"DateString":"2019-02-26T00:00:00","Date":"/Date(1551139200000+0000)/","Status":"AUTHORISED","LineAmountTypes":"Inclusive","LineItems":[{"Description":"Foobar","UnitAmount":20.0,"TaxType":"TAX001","TaxAmount":1.74,"LineAmount":20.0,"AccountCode":"400","Tracking":[],"Quantity":1.0,"LineItemID":"d2a06879-da49-4d6c-83b5-72a93a523ec6","ValidationErrors":[]}],"SubTotal":18.26,"TotalTax":1.74,"Total":20.0,"UpdatedDateUTC":"/Date(1551213567813+0000)/","CurrencyCode":"USD","StatusAttributeString":"ERROR","ValidationErrors":[{"Message":"The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber"}]}]}