UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 675 kB
{"openapi":"3.0.0","servers":[{"description":"The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint.","url":"https://api.xero.com/api.xro/2.0"}],"x-hasEquivalentPaths":true,"info":{"contact":{"email":"api@xero.com","name":"Xero Platform Team","url":"https://developer.xero.com","x-twitter":"XeroAPI"},"termsOfService":"https://developer.xero.com/xero-developer-platform-terms-conditions/","title":"Xero Accounting API","version":"2.9.4","x-apisguru-categories":["financial"],"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/xero_accounting.yaml","version":"3.0"}],"x-providerName":"xero.com","x-serviceName":"xero_accounting"},"paths":{"/Accounts":{"get":{"operationId":"getAccounts","parameters":[{"$ref":"#/components/parameters/ifModifiedSince"},{"description":"Filter by an any element","example":"Status=="ACTIVE" AND Type=="BANK"","in":"query","name":"where","schema":{"type":"string"},"x-example-java":"Status=="' + Account.StatusEnum.ACTIVE+ '"","x-example-php":"Status=="' . \\XeroAPI\\XeroPHP\\Models\\Accounting\\Account::STATUS_ACTIVE . '"","x-ruby-param":"Status==#{XeroRuby::Accounting::Account::ACTIVE}"},{"description":"Order by an any element","example":"Name ASC","in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Accounts\": [{ \"AccountID\": \"ebd06280-af70-4bed-97c6-7451a454ad85\", \"Code\": \"091\", \"Name\": \"Business Savings Account\", \"Type\": \"BANK\", \"TaxType\": \"NONE\", \"EnablePaymentsToAccount\": false, \"BankAccountNumber\": \"0209087654321050\", \"BankAccountType\": \"BANK\", \"CurrencyCode\": \"NZD\" },{ \"AccountID\": \"7d05a53d-613d-4eb2-a2fc-dcb6adb80b80\", \"Code\": \"200\", \"Name\": \"Sales\", \"Type\": \"REVENUE\", \"TaxType\": \"OUTPUT2\", \"Description\": \"Income from any normal business activity\", \"EnablePaymentsToAccount\": false }] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Success - return response of type Accounts array with 0 to n Account"}},"security":[{"OAuth2":["accounting.settings"]}],"summary":"Retrieves the full chart of accounts","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader","type":"string"}],"put":{"operationId":"createAccount","requestBody":{"content":{"application/json":{"example":"{ \"Code\":\"123456\", \"Name\":\"Foobar\", \"Type\":\"EXPENSE\", \"Description\":\"Hello World\" }","schema":{"$ref":"#/components/schemas/Account"}}},"description":"Account object in body of request","required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"11814c9d-3b5e-492e-93b0-fad16bf3244f\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550793549392)\\/\", \"Accounts\": [ { \"AccountID\": \"66b262e2-561e-423e-8937-47d558f13442\", \"Code\": \"123456\", \"Name\": \"Foobar\", \"Status\": \"ACTIVE\", \"Type\": \"EXPENSE\", \"TaxType\": \"INPUT\", \"Description\": \"Hello World\", \"Class\": \"EXPENSE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"ReportingCode\": \"EXP\", \"ReportingCodeName\": \"Expense\", \"UpdatedDateUTC\": \"\\/Date(1550793549320+0000)\\/\" } ] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Success - created new Account and return response of type Accounts array with new Account"},"400":{"content":{"application/json":{"example":"{ \"ErrorNumber\": 10, \"Type\": \"ValidationException\", \"Message\": \"A validation exception occurred\", \"Elements\": [ { \"AccountID\": \"00000000-0000-0000-0000-000000000000\", \"Code\": \"123456\", \"Name\": \"Foobar\", \"Type\": \"EXPENSE\", \"Description\": \"Hello World\", \"ValidationErrors\": [ { \"Message\": \"Please enter a unique Name.\" } ] } ] }","schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation Error - some data was incorrect returns response of type Error"}},"security":[{"OAuth2":["accounting.settings"]}],"summary":"Creates a new chart of accounts","tags":["Accounting"],"x-example":[{"is_object":true,"key":"account","keyPascal":"Account","object":null},{"code":null,"default":123456,"key":"code","keyPascal":"Code","object":"account"},{"default":"FooBar","key":"name","keyPascal":"Name","name":null,"object":"account"},{"csharp":"Account.ClassEnum.EXPENSE","default":"EXPENSE","java":"com.xero.models.accounting.AccountType.EXPENSE","key":"type","keyPascal":"Type","node":"AccountType.EXPENSE","nonString":true,"object":"account","php":"XeroAPI\\XeroPHP\\Models\\Accounting\\AccountType::EXPENSE","python":"AccountType.EXPENSE","ruby":"XeroRuby::Accounting::AccountType::EXPENSE","type":null},{"default":"Hello World","description":null,"is_last":true,"key":"description","keyPascal":"Description","object":"account"}],"x-hasAccountingValidationError":true,"x-node-requestBody":"{ code: \"123456\", name: \"Foobar\", type: AccountType.EXPENSE, description: \"Hello World\" }","x-ruby-requestBody":"account = { code: \"123456\", name: \"Foobar\", type: XeroRuby::Accounting::AccountType::EXPENSE, description: \"Hello World\" }"}},"/Accounts/{AccountID}":{"delete":{"operationId":"deleteAccount","parameters":[{"description":"Unique identifier for retrieving single object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"76bb0543-8efe-4acc-b7f6-67dfcdec37b4\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550798217216)\\/\", \"Accounts\": [ { \"AccountID\": \"7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1\", \"Code\": \"123456\", \"Name\": \"FooBar\", \"Status\": \"DELETED\", \"Type\": \"EXPENSE\", \"TaxType\": \"INPUT\", \"Description\": \"Hello World\", \"Class\": \"EXPENSE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"ReportingCode\": \"EXP\", \"ReportingCodeName\": \"Expense\", \"UpdatedDateUTC\": \"\\/Date(1550798217210+0000)\\/\" } ] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Success - delete existing Account and return response of type Accounts array with deleted Account"},"400":{"content":{"application/json":{"example":"{ \"ErrorNumber\": 10, \"Type\": \"ValidationException\", \"Message\": \"A validation exception occurred\", \"Elements\": [ { \"AccountID\": \"00000000-0000-0000-0000-000000000000\", \"Code\": \"123456\", \"Name\": \"Foobar\", \"Type\": \"EXPENSE\", \"Description\": \"Hello World\", \"ValidationErrors\": [ { \"Message\": \"Please enter a unique Name.\" } ] } ] }","schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation Error - some data was incorrect returns response of type Error"}},"security":[{"OAuth2":["accounting.settings"]}],"summary":"Deletes a chart of accounts","tags":["Accounting"],"x-hasAccountingValidationError":true},"get":{"operationId":"getAccount","parameters":[{"description":"Unique identifier for retrieving single object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"323455cc-9511-4451-a873-248d2983f38e\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550797359081)\\/\", \"Accounts\": [ { \"AccountID\": \"99ce6032-0678-4aa0-8148-240c75fee33a\", \"Code\": \"123456\", \"Name\": \"FooBar\", \"Status\": \"ACTIVE\", \"Type\": \"EXPENSE\", \"TaxType\": \"INPUT\", \"Description\": \"Hello World\", \"Class\": \"EXPENSE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"ReportingCode\": \"EXP\", \"ReportingCodeName\": \"Expense\", \"UpdatedDateUTC\": \"\\/Date(1550797359120+0000)\\/\" } ] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Success - return response of type Accounts array with one Account"}},"security":[{"OAuth2":["accounting.settings"]}],"summary":"Retrieves a single chart of accounts by using a unique account Id","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}],"post":{"operationId":"updateAccount","parameters":[{"description":"Unique identifier for retrieving single object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":"{ \"Accounts\":[ { \"Code\":\"123456\", \"Name\":\"BarFoo\", \"AccountID\":\"99ce6032-0678-4aa0-8148-240c75fee33a\", \"Type\":\"EXPENSE\", \"Description\":\"GoodBye World\", \"TaxType\":\"INPUT\", \"EnablePaymentsToAccount\":false, \"ShowInExpenseClaims\":false, \"Class\":\"EXPENSE\", \"ReportingCode\":\"EXP\", \"ReportingCodeName\":\"Expense\", \"UpdatedDateUTC\":\"2019-02-21T16:29:47.96-08:00\" } ] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Request of type Accounts array with one Account","required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"9012e75c-ec08-40a9-ae15-153fc1f35c4d\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550795389340)\\/\", \"Accounts\": [ { \"AccountID\": \"99ce6032-0678-4aa0-8148-240c75fee33a\", \"Code\": \"654321\", \"Name\": \"BarFoo\", \"Status\": \"ACTIVE\", \"Type\": \"EXPENSE\", \"TaxType\": \"INPUT\", \"Description\": \"Good Bye World\", \"Class\": \"EXPENSE\", \"EnablePaymentsToAccount\": false, \"ShowInExpenseClaims\": false, \"ReportingCode\": \"EXP\", \"ReportingCodeName\": \"Expense\", \"UpdatedDateUTC\": \"\\/Date(1550795389333+0000)\\/\" } ] }","schema":{"$ref":"#/components/schemas/Accounts"}}},"description":"Success - update existing Account and return response of type Accounts array with updated Account"},"400":{"content":{"application/json":{"example":"{ \"ErrorNumber\": 10, \"Type\": \"ValidationException\", \"Message\": \"A validation exception occurred\", \"Elements\": [ { \"AccountID\": \"00000000-0000-0000-0000-000000000000\", \"Code\": \"123456\", \"Name\": \"Foobar\", \"Type\": \"EXPENSE\", \"Description\": \"Hello World\", \"ValidationErrors\": [ { \"Message\": \"Please enter a unique Name.\" } ] } ] }","schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation Error - some data was incorrect returns response of type Error"}},"security":[{"OAuth2":["accounting.settings"]}],"summary":"Updates a chart of accounts","tags":["Accounting"],"x-example":[{"account":null,"is_object":true,"key":"account","keyPascal":"Account"},{"code":null,"default":123456,"key":"code","keyPascal":"Code","object":"account"},{"default":"BarFoo","key":"name","keyPascal":"Name","name":null,"object":"account"},{"csharp":"Account.ClassEnum.EXPENSE","default":"EXPENSE","java":"com.xero.models.accounting.AccountType.EXPENSE","key":"type","keyPascal":"Type","node":"AccountType.EXPENSE","nonString":true,"object":"account","php":"XeroAPI\\XeroPHP\\Models\\Accounting\\AccountType::EXPENSE","python":"AccountType.EXPENSE","ruby":"XeroRuby::Accounting::AccountType::EXPENSE","type":null},{"default":"Hello World","description":null,"key":"description","keyPascal":"Description","object":"account"},{"default":"NONE","is_last":true,"key":"taxType","keyPascal":"TaxType","keySnake":"tax_type","object":"account","taxType":null},{"accounts":null,"is_object":true,"key":"accounts","keyPascal":"Accounts"},{"accounts":null,"is_array_add":true,"is_last":true,"java":"Accounts","key":"accounts","keyPascal":"Accounts","object":"account"}],"x-hasAccountingValidationError":true,"x-node-requestBody":"{ accounts: [{ code: \"123456\", name: \"BarFoo\", accountID: \"00000000-0000-0000-0000-000000000000\", type: AccountType.EXPENSE, description: \"GoodBye World\", taxType: TaxType.INPUT }]}","x-ruby-requestBody":"{ accounts: [{ code: \"123456\", name: \"BarFoo\", account_id: \"00000000-0000-0000-0000-000000000000\", type: XeroRuby::Accounting::Account::EXPENSE, description: \"GoodBye World\", tax_type: XeroRuby::Accounting::TaxType::NONE }]}"}},"/Accounts/{AccountID}/Attachments":{"get":{"operationId":"getAccountAttachments","parameters":[{"description":"Unique identifier for Account object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"439c1573-3cd8-4697-a9f6-81fa651ee8f3\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550852630329)\\/\", \"Attachments\": [ { \"AttachmentID\": \"52a643be-cd5c-489f-9778-53a9fd337756\", \"FileName\": \"sample5.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 } ] }","schema":{"$ref":"#/components/schemas/Attachments"}}},"description":"Success - return response of type Attachments array of Attachment","x-isAttachment":true}},"security":[{"OAuth2":["accounting.attachments.read"]}],"summary":"Retrieves attachments for a specific accounts by using a unique account Id","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}]},"/Accounts/{AccountID}/Attachments/{AttachmentID}":{"get":{"operationId":"getAccountAttachmentById","parameters":[{"description":"Unique identifier for Account object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Unique identifier for Attachment object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AttachmentID","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf","example":"image/jpg","in":"header","name":"contentType","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success - return response of attachment for Account as binary data"}},"security":[{"OAuth2":["accounting.attachments.read"]}],"summary":"Retrieves a specific attachment from a specific account using a unique attachment Id","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}]},"/Accounts/{AccountID}/Attachments/{FileName}":{"get":{"operationId":"getAccountAttachmentByFileName","parameters":[{"description":"Unique identifier for Account object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Name of the attachment","example":"xero-dev.jpg","in":"path","name":"FileName","required":true,"schema":{"type":"string"}},{"description":"The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf","example":"image/jpg","in":"header","name":"contentType","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success - return response of attachment for Account as binary data"}},"security":[{"OAuth2":["accounting.attachments.read"]}],"summary":"Retrieves an attachment for a specific account by filename","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}],"post":{"operationId":"updateAccountAttachmentByFileName","parameters":[{"description":"Unique identifier for Account object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Name of the attachment","example":"xero-dev.jpg","in":"path","name":"FileName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"byte","type":"string"}}},"description":"Byte array of file in body of request","required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"c8d6413a-1da2-4faa-9848-21f60443e906\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550859714477)\\/\", \"Attachments\": [ { \"AttachmentID\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"FileName\": \"sample5.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 } ] }","schema":{"$ref":"#/components/schemas/Attachments"}}},"description":"Success - return response of type Attachments array of Attachment","x-isAttachment":true},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation Error - some data was incorrect returns response of type Error"}},"security":[{"OAuth2":["accounting.attachments"]}],"summary":"Updates attachment on a specific account by filename","tags":["Accounting"],"x-hasAccountingValidationError":true},"put":{"operationId":"createAccountAttachmentByFileName","parameters":[{"description":"Unique identifier for Account object","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"AccountID","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Name of the attachment","example":"xero-dev.jpg","in":"path","name":"FileName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"byte","type":"string"}}},"description":"Byte array of file in body of request","required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"724cdff5-bcd1-4c5c-977e-e864c24258e0\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1550856817769)\\/\", \"Attachments\": [ { \"AttachmentID\": \"ab95b276-9dce-4925-9077-439818ba270f\", \"FileName\": \"sample5.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 } ] }","schema":{"$ref":"#/components/schemas/Attachments"}}},"description":"Success - return response of type Attachments array of Attachment","x-isAttachment":true},"400":{"$ref":"#/components/responses/400Error"}},"security":[{"OAuth2":["accounting.attachments"]}],"summary":"Creates an attachment on a specific account","tags":["Accounting"],"x-hasAccountingValidationError":true}},"/BankTransactions":{"get":{"operationId":"getBankTransactions","parameters":[{"$ref":"#/components/parameters/ifModifiedSince"},{"description":"Filter by an any element","example":"Status==\"AUTHORISED\"","in":"query","name":"where","schema":{"type":"string"},"x-example-java":"Status=="' + BankTransaction.StatusEnum.AUTHORISED + '"","x-example-php":"Status=="' . XeroAPI\\XeroPHP\\Models\\Accounting\\BankTransaction::STATUS_AUTHORISED . '"","x-ruby-param":"Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED}"},{"description":"Order by an any element","example":"Type ASC","in":"query","name":"order","schema":{"type":"string"}},{"description":"Up to 100 bank transactions will be returned in a single API call with line items details","example":1,"in":"query","name":"page","schema":{"type":"integer"}},{"$ref":"#/components/parameters/unitdp"}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"18e7e80c-5dca-4a57-974e-8b572cc5efe8\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"/Date(1551212901659)/\", \"BankTransactions\": [ { \"BankTransactionID\": \"db54aab0-ad40-4ced-bcff-0940ba20db2c\", \"BankAccount\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\", \"Code\": \"088\", \"Name\": \"Business Wells Fargo\" }, \"BatchPayment\": { \"Account\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\" }, \"BatchPaymentID\": \"b54aa50c-794c-461b-89d1-846e1b84d9c0\", \"Date\": \"/Date(1476316800000+0000)/\", \"Type\": \"RECBATCH\", \"Status\": \"AUTHORISED\", \"TotalAmount\": \"12.00\", \"UpdatedDateUTC\": \"/Date(1476392487037+0000)/\", \"IsReconciled\": \"false\" }, \"Type\": \"RECEIVE\", \"IsReconciled\": false, \"PrepaymentID\": \"cb62750f-b49c-464b-a45b-e2e2c514c8a9\", \"HasAttachments\": true, \"Contact\": { \"ContactID\": \"9c2c64de-12c9-4167-b503-e2c0e1aa1f49\", \"Name\": \"sam\", \"Addresses\": [], \"Phones\": [], \"ContactGroups\": [], \"ContactPersons\": [], \"HasValidationErrors\": false }, \"DateString\": \"2016-10-13T00:00:00\", \"Date\": \"/Date(1476316800000+0000)/\", \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Exclusive\", \"LineItems\": [], \"SubTotal\": 10, \"TotalTax\": 0, \"Total\": 10, \"UpdatedDateUTC\": \"/Date(1476389616437+0000)/\", \"CurrencyCode\": \"USD\" }, { \"BankTransactionID\": \"29a69c45-64ca-4805-a1cc-34990de837b3\", \"BankAccount\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\", \"Code\": \"088\", \"Name\": \"Business Wells Fargo\" }, \"Type\": \"SPEND-OVERPAYMENT\", \"IsReconciled\": false, \"OverpaymentID\": \"7d457db3-3b0a-47e9-8b79-81252a7bcdcb\", \"HasAttachments\": false, \"Contact\": { \"ContactID\": \"9c2c64de-12c9-4167-b503-e2c0e1aa1f49\", \"Name\": \"sam\", \"Addresses\": [], \"Phones\": [], \"ContactGroups\": [], \"ContactPersons\": [], \"HasValidationErrors\": false }, \"DateString\": \"2016-10-13T00:00:00\", \"Date\": \"/Date(1476316800000+0000)/\", \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"NoTax\", \"LineItems\": [], \"SubTotal\": 9, \"TotalTax\": 0, \"Total\": 9, \"UpdatedDateUTC\": \"/Date(1476389930500+0000)/\", \"CurrencyCode\": \"USD\" }, { \"BankTransactionID\": \"0b89bf5c-d40b-4514-96be-36a739fb0188\", \"BankAccount\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\", \"Code\": \"088\", \"Name\": \"Business Wells Fargo\" }, \"Type\": \"SPEND-OVERPAYMENT\", \"IsReconciled\": false, \"OverpaymentID\": \"bf9b5f33-c0d6-4182-84a2-40848023e5a1\", \"HasAttachments\": false, \"Contact\": { \"ContactID\": \"9c2c64de-12c9-4167-b503-e2c0e1aa1f49\", \"Name\": \"sam\", \"Addresses\": [], \"Phones\": [], \"ContactGroups\": [], \"ContactPersons\": [], \"HasValidationErrors\": false }, \"DateString\": \"2016-10-13T00:00:00\", \"Date\": \"/Date(1476316800000+0000)/\", \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"NoTax\", \"LineItems\": [], \"SubTotal\": 8, \"TotalTax\": 0, \"Total\": 8, \"UpdatedDateUTC\": \"/Date(1476392487037+0000)/\", \"CurrencyCode\": \"USD\" } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"Success - return response of type BankTransactions array with 0 to n BankTransaction"}},"security":[{"OAuth2":["accounting.transactions.read"]}],"summary":"Retrieves any spent or received money transactions","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}],"post":{"operationId":"updateOrCreateBankTransactions","parameters":[{"$ref":"#/components/parameters/summarizeErrors"},{"$ref":"#/components/parameters/unitdp"}],"requestBody":{"content":{"application/json":{"example":"{ \"BankTransactions\": [ { \"Type\": \"SPEND\", \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\" }, \"Lineitems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"400\" } ], \"BankAccount\": { \"Code\": \"088\" } } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"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.000000, \"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.00, \"TaxType\": \"TAX001\", \"TaxAmount\": 1.74, \"LineAmount\": 20.00, \"AccountCode\": \"400\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"d2a06879-da49-4d6c-83b5-72a93a523ec6\", \"ValidationErrors\": [] } ], \"SubTotal\": 18.26, \"TotalTax\": 1.74, \"Total\": 20.00, \"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\" } ] } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"Success - return response of type BankTransactions array with new BankTransaction"},"400":{"$ref":"#/components/responses/400Error"}},"security":[{"OAuth2":["accounting.transactions"]}],"summary":"Updates or creates one or more spent or received money transaction","tags":["Accounting"],"x-example":[{"contact":null,"is_object":true,"key":"contact","keyPascal":"Contact"},{"contactID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"contactId","keyPascal":"ContactID","keySnake":"contact_id","object":"contact"},{"is_object":true,"key":"lineItem","keyPascal":"LineItem","keySnake":"line_item","lineItem":null},{"default":"Foobar","description":null,"key":"description","keyPascal":"Description","object":"lineItem"},{"default":1,"key":"quantity","keyPascal":"Quantity","nonString":true,"object":"lineItem","quantity":null},{"default":20,"key":"unitAmount","keyPascal":"UnitAmount","keySnake":"unit_amount","nonString":true,"object":"lineItem","unitAmount":null},{"accountCode":null,"default":"000","is_last":true,"key":"accountCode","keyPascal":"AccountCode","keySnake":"account_code","object":"lineItem"},{"bankAccount":null,"is_object":true,"key":"bankAccount","keyPascal":"Account","keySnake":"bank_account"},{"accountID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"accountID","keyPascal":"AccountID","keySnake":"account_id","object":"bankAccount"},{"bankTransaction":null,"is_object":true,"key":"bankTransaction","keyPascal":"BankTransaction","keySnake":"bank_transaction"},{"csharp":"BankTransaction.TypeEnum.RECEIVE","default":"RECEIVE","java":"com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE","key":"type","keyPascal":"Type","node":"BankTransaction.TypeEnum.RECEIVE","nonString":true,"object":"bankTransaction","php":"XeroAPI\\XeroPHP\\Models\\Accounting\\BankTransaction::TYPE_RECEIVE","python_string":"RECEIVE","ruby":"XeroRuby::Accounting::BankTransaction::RECEIVE","type":null},{"default":"contact","is_variable":true,"key":"contact","keyPascal":"Contact","nonString":true,"object":"bankTransaction","set_contact":null},{"add_lineitems":null,"is_array_add":true,"java":"LineItems","key":"bankTransaction","keyPascal":"LineItems","keySnake":"line_items","object":"lineItem","python":"line_item"},{"default":"bankAccount","is_last":true,"is_variable":true,"key":"bankAccount","keyPascal":"BankAccount","keySnake":"bank_account","nonString":true,"object":"bankTransaction","python":"bank_account","set_bankaccount":null},{"bankTransactions":null,"is_object":true,"key":"bankTransactions","keyPascal":"BankTransactions"},{"add_bankTransaction":null,"is_array_add":true,"is_last":true,"java":"BankTransactions","key":"bankTransactions","keyPascal":"BankTransactions","keySnake":"bank_transactions","object":"bankTransaction","python":"bank_transaction"}],"x-hasAccountingValidationError":true,"x-node-requestBody":"{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactId: \"00000000-0000-0000-0000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"000\" }], bankAccount: { code: \"000\" }}]}","x-ruby-requestBody":"bank_transactions = { bank_transactions: [{ type: XeroRuby::Accounting::BankTransaction::SPEND, contact: { contact_id: \"00000000-0000-0000-0000-000000000000\" }, line_items: [{ description: \"Foobar\", quantity: 1.0, unit_amount: 20.0, account_code: \"000\" }], bank_account: { code: \"000\" }}]}"},"put":{"operationId":"createBankTransactions","parameters":[{"$ref":"#/components/parameters/summarizeErrors"},{"$ref":"#/components/parameters/unitdp"}],"requestBody":{"content":{"application/json":{"example":"{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: \"00000000-0000-0000-0000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"000\" } ], bankAccount: { code: \"000\" }}]}","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"BankTransactions with an array of BankTransaction objects in body of request","required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"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.000000, \"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.00, \"TaxType\": \"TAX001\", \"TaxAmount\": 1.74, \"LineAmount\": 20.00, \"AccountCode\": \"400\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"d2a06879-da49-4d6c-83b5-72a93a523ec6\", \"ValidationErrors\": [] } ], \"SubTotal\": 18.26, \"TotalTax\": 1.74, \"Total\": 20.00, \"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\" } ] } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"Success - return response of type BankTransactions array with new BankTransaction"},"400":{"$ref":"#/components/responses/400Error"}},"security":[{"OAuth2":["accounting.transactions"]}],"summary":"Creates one or more spent or received money transaction","tags":["Accounting"],"x-example":[{"contact":null,"is_object":true,"key":"contact","keyPascal":"Contact"},{"contactID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"contactId","keyPascal":"ContactID","keySnake":"contact_id","object":"contact"},{"is_object":true,"key":"lineItem","keyPascal":"LineItem","keySnake":"line_item","lineItem":null},{"default":"Foobar","description":null,"key":"description","keyPascal":"Description","object":"lineItem"},{"default":1,"key":"quantity","keyPascal":"Quantity","nonString":true,"object":"lineItem","quantity":null},{"default":20,"key":"unitAmount","keyPascal":"UnitAmount","keySnake":"unit_amount","nonString":true,"object":"lineItem","unitAmount":null},{"accountCode":null,"default":"000","is_last":true,"key":"accountCode","keyPascal":"AccountCode","keySnake":"account_code","object":"lineItem"},{"bankAccount":null,"is_object":true,"key":"bankAccount","keyPascal":"Account","keySnake":"bank_account"},{"accountID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"accountID","keyPascal":"AccountID","keySnake":"account_id","object":"bankAccount"},{"bankTransaction":null,"is_object":true,"key":"bankTransaction","keyPascal":"BankTransaction","keySnake":"bank_transaction"},{"csharp":"BankTransaction.TypeEnum.RECEIVE","default":"RECEIVE","java":"com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE","key":"type","keyPascal":"Type","node":"BankTransaction.TypeEnum.RECEIVE","nonString":true,"object":"bankTransaction","php":"XeroAPI\\XeroPHP\\Models\\Accounting\\BankTransaction::TYPE_RECEIVE","python_string":"RECEIVE","ruby":"XeroRuby::Accounting::BankTransaction::RECEIVE","type":null},{"default":"contact","is_variable":true,"key":"contact","keyPascal":"Contact","nonString":true,"object":"bankTransaction","set_contact":null},{"add_lineitems":null,"is_array_add":true,"java":"LineItems","key":"bankTransaction","keyPascal":"LineItems","keySnake":"line_items","object":"lineItem","python":"line_item"},{"default":"bankAccount","is_last":true,"is_variable":true,"key":"bankAccount","keyPascal":"BankAccount","keySnake":"bank_account","nonString":true,"object":"bankTransaction","python":"bank_account","set_bankaccount":null},{"bankTransactions":null,"is_object":true,"key":"bankTransactions","keyPascal":"BankTransactions"},{"add_bankTransaction":null,"is_array_add":true,"is_last":true,"java":"BankTransactions","key":"bankTransactions","keyPascal":"BankTransactions","keySnake":"bank_transactions","object":"bankTransaction","python":"bank_transaction"}],"x-hasAccountingValidationError":true,"x-node-requestBody":"{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: \"00000000-0000-0000-0000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"000\" } ], bankAccount: { code: \"000\" }}]}","x-ruby-requestBody":"bank_transactions = { bank_transactions: [{ type: XeroRuby::Accounting::BankTransaction::SPEND, contact: { contact_id: \"00000000-0000-0000-0000-000000000000\" }, line_items: [{ description: \"Foobar\", quantity: 1.0, unit_amount: 20.0, account_code: \"000\" } ], bank_account: { code: \"000\" }}]}"}},"/BankTransactions/{BankTransactionID}":{"get":{"operationId":"getBankTransaction","parameters":[{"description":"Xero generated unique identifier for a bank transaction","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"BankTransactionID","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/unitdp"}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"612e204d-21ab-469b-ac84-afe0697b4461\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1551212902962)\\/\", \"BankTransactions\": [ { \"BankTransactionID\": \"db54aab0-ad40-4ced-bcff-0940ba20db2c\", \"BankAccount\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\", \"Code\": \"088\", \"Name\": \"Business Wells Fargo\" }, \"BatchPayment\": { \"Account\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\" }, \"BatchPaymentID\": \"b54aa50c-794c-461b-89d1-846e1b84d9c0\", \"Date\": \"\\/Date(1476316800000+0000)\\/\", \"Type\": \"RECBATCH\", \"Status\": \"AUTHORISED\", \"TotalAmount\": \"12.00\", \"UpdatedDateUTC\": \"\\/Date(1476392487037+0000)\\/\", \"IsReconciled\": \"false\" }, \"Type\": \"RECEIVE\", \"IsReconciled\": false, \"CurrencyRate\": 1.000000, \"PrepaymentID\": \"cb62750f-b49c-464b-a45b-e2e2c514c8a9\", \"HasAttachments\": true, \"Attachments\": [ { \"AttachmentID\": \"45dd3143-9856-42d2-9a6c-53814f67a33e\", \"FileName\": \"sample2.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/banktransaction/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 } ], \"Contact\": { \"ContactID\": \"9c2c64de-12c9-4167-b503-e2c0e1aa1f49\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"sam\", \"EmailAddress\": \"\", \"BankAccountDetails\": \"\", \"Addresses\": [ { \"AddressType\": \"STREET\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" }, { \"AddressType\": \"POBOX\", \"City\": \"\", \"Region\": \"\", \"PostalCode\": \"\", \"Country\": \"\" } ], \"Phones\": [ { \"PhoneType\": \"DEFAULT\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"DDI\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"FAX\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" }, { \"PhoneType\": \"MOBILE\", \"PhoneNumber\": \"\", \"PhoneAreaCode\": \"\", \"PhoneCountryCode\": \"\" } ], \"UpdatedDateUTC\": \"\\/Date(1518821703467+0000)\\/\", \"ContactGroups\": [], \"DefaultCurrency\": \"USD\", \"ContactPersons\": [], \"HasValidationErrors\": false }, \"DateString\": \"2016-10-13T00:00:00\", \"Date\": \"\\/Date(1476316800000+0000)\\/\", \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Exclusive\", \"LineItems\": [ { \"Description\": \"hello\", \"UnitAmount\": 10.00, \"TaxType\": \"OUTPUT\", \"TaxAmount\": 0.00, \"LineAmount\": 10.00, \"AccountCode\": \"400\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"40bec527-a744-4149-96c5-0ab643b51158\", \"ValidationErrors\": [] } ], \"SubTotal\": 10.00, \"TotalTax\": 0.00, \"Total\": 10.00, \"UpdatedDateUTC\": \"\\/Date(1476389616437+0000)\\/\", \"CurrencyCode\": \"USD\" } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"Success - return response of type BankTransactions array with a specific BankTransaction"}},"security":[{"OAuth2":["accounting.transactions.read"]}],"summary":"Retrieves a single spent or received money transaction by using a unique bank transaction Id","tags":["Accounting"]},"parameters":[{"$ref":"#/components/parameters/requiredHeader"}],"post":{"operationId":"updateBankTransaction","parameters":[{"description":"Xero generated unique identifier for a bank transaction","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"BankTransactionID","required":true,"schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/unitdp"}],"requestBody":{"content":{"application/json":{"example":"{ \"BankTransactions\": [ { \"Type\": \"SPEND\", \"Contact\": { \"ContactID\": \"00000000-0000-0000-0000-000000000000\", \"ContactStatus\": \"ACTIVE\", \"Name\": \"Buzz Lightyear\", \"FirstName\": \"Buzz\", \"LastName\": \"Lightyear\", \"EmailAddress\": \"buzz.Lightyear@email.com\", \"ContactPersons\": [], \"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\": \"2017-08-21T13:49:04.227-07:00\", \"ContactGroups\": [] }, \"Lineitems\": [], \"BankAccount\": { \"Code\": \"088\", \"Name\": \"Business Wells Fargo\", \"AccountID\": \"00000000-0000-0000-0000-000000000000\" }, \"IsReconciled\": false, \"Date\": \"2019-02-25\", \"Reference\": \"You just updated\", \"CurrencyCode\": \"USD\", \"CurrencyRate\": 1, \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Inclusive\", \"TotalTax\": 1.74, \"BankTransactionID\": \"00000000-0000-0000-0000-000000000000\", \"UpdatedDateUTC\": \"2019-02-26T12:39:27.813-08:00\" } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"f2c7f037-96fc-49bd-8f59-d3c7bfdd4746\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1551213568875)\\/\", \"BankTransactions\": [ { \"BankTransactionID\": \"1289c190-e46d-434b-9628-463ffdb52f00\", \"BankAccount\": { \"AccountID\": \"6f7594f2-f059-4d56-9e67-47ac9733bfe9\", \"Code\": \"088\", \"Name\": \"Business Wells Fargo\" }, \"Type\": \"SPEND\", \"Reference\": \"You just updated\", \"IsReconciled\": false, \"CurrencyRate\": 1.000000, \"HasAttachments\": false, \"Attachments\": [], \"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-25T00:00:00\", \"Date\": \"\\/Date(1551052800000+0000)\\/\", \"Status\": \"AUTHORISED\", \"LineAmountTypes\": \"Inclusive\", \"LineItems\": [ { \"Description\": \"Foobar\", \"UnitAmount\": 20.00, \"TaxType\": \"TAX001\", \"TaxAmount\": 1.74, \"LineAmount\": 20.00, \"AccountCode\": \"400\", \"Tracking\": [], \"Quantity\": 1.0000, \"LineItemID\": \"d2a06879-da49-4d6c-83b5-72a93a523ec6\", \"ValidationErrors\": [] } ], \"SubTotal\": 18.26, \"TotalTax\": 1.74, \"Total\": 20.00, \"UpdatedDateUTC\": \"\\/Date(1551213568733+0000)\\/\", \"CurrencyCode\": \"USD\" } ] }","schema":{"$ref":"#/components/schemas/BankTransactions"}}},"description":"Success - return response of type BankTransactions array with updated BankTransaction"},"400":{"$ref":"#/components/responses/400Error"}},"security":[{"OAuth2":["accounting.transactions"]}],"summary":"Updates a single spent or received money transaction","tags":["Accounting"],"x-example":[{"contact":null,"is_object":true,"key":"contact","keyPascal":"Contact"},{"contactID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"contactId","keyPascal":"ContactID","keySnake":"contact_id","object":"contact"},{"is_object":true,"key":"lineItem","keyPascal":"LineItem","keySnake":"line_item","lineItem":null},{"default":"Foobar","description":null,"key":"description","keyPascal":"Description","object":"lineItem"},{"default":1,"key":"quantity","keyPascal":"Quantity","nonString":true,"object":"lineItem","quantity":null},{"default":20,"key":"unitAmount","keyPascal":"UnitAmount","keySnake":"unit_amount","nonString":true,"object":"lineItem","unitAmount":null},{"accountCode":null,"default":"000","is_last":true,"key":"accountCode","keyPascal":"AccountCode","keySnake":"account_code","object":"lineItem"},{"bankAccount":null,"is_object":true,"key":"bankAccount","keyPascal":"Account","keySnake":"bank_account"},{"accountID":null,"default":"00000000-0000-0000-0000-000000000000","is_last":true,"is_uuid":true,"key":"accountID","keyPascal":"AccountID","keySnake":"account_id","object":"bankAccount"},{"bankTransaction":null,"is_object":true,"key":"bankTransaction","keyPascal":"BankTransaction","keySnake":"bank_transaction"},{"default":"You just updated","key":"reference","keyPascal":"Reference","object":"bankTransaction","reference":null},{"csharp":"BankTransaction.TypeEnum.RECEIVE","default":"RECEIVE","java":"com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE","key":"type","keyPascal":"Type","node":"BankTransaction.TypeEnum.RECEIVE","nonString":true,"object":"bankTransaction","php":"XeroAPI\\XeroPHP\\Models\\Accounting\\BankTransaction::TYPE_RECEIVE","python_string":"RECEIVE","ruby":"XeroRuby::Accounting::BankTransaction::RECEIVE","type":null},{"default":"contact","is_variable":true,"key":"contact","keyPascal":"Contact","nonString":true,"object":"bankTransaction","set_contact":null},{"add_lineitems":null,"is_array_add":true,"java":"LineItems","key":"bankTransaction","keyPascal":"LineItems","keySnake":"line_items","object":"lineItem","python":"line_item"},{"default":"bankAccount","is_last":true,"is_variable":true,"key":"bankAccount","keyPascal":"BankAccount","keySnake":"bank_account","nonString":true,"object":"bankTransaction","python":"bank_account","set_bankaccount":null},{"bankTransactions":null,"is_object":true,"key":"bankTransactions","keyPascal":"BankTransactions"},{"add_bankTransaction":null,"is_array_add":true,"is_last":true,"java":"BankTransactions","key":"bankTransactions","keyPascal":"BankTransactions","keySnake":"bank_transactions","object":"bankTransaction","python":"bank_transaction"}],"x-hasAccountingValidationError":true,"x-node-requestBody":"{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: \"2019-02-25\", reference: \"You just updated\", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: \"00000000-0000-0000-0000-000000000000\", lineItems: [], contact: {}, bankAccount: { accountID: \"00000000-0000-0000-0000-000000000000\" }}]}","x-ruby-requestBody":"{ bank_transactions: [{ type: XeroRuby::Accounting::BankTransaction::SPEND, date: \"2019-02-25\", reference: \"You just updated\", status: XeroRuby::Accounting::BankTransaction::AUTHORISED, bank_transaction_id: \"00000000-0000-0000-0000-000000000000\", line_items: [], contact: {}, bank_account: { account_id: \"00000000-0000-0000-0000-000000000000\" }}]}"}},"/BankTransactions/{BankTransactionID}/Attachments":{"get":{"operationId":"getBankTransactionAttachments","parameters":[{"description":"Xero generated unique identifier for a bank transaction","example":"00000000-0000-0000-0000-000000000000","in":"path","name":"BankTransactionID","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":"{ \"Id\": \"c50798e1-29e9-4a30-a452-bb6e42e400c8\", \"Status\": \"OK\", \"ProviderName\": \"Xero API Partner\", \"DateTimeUTC\": \"\\/Date(1551303999577)\\/\", \"Attachments\": [ { \"AttachmentID\": \"4508a692-e52c-4ad8-a138-2f13e22bf57b\", \"FileName\": \"sample5.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 }, { \"AttachmentID\": \"45dd3143-9856-42d2-9a6c-53814f67a33e\", \"FileName\": \"sample2.jpg\", \"Url\": \"https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg\", \"MimeType\": \"image/jpg\", \"ContentLength\": 2878711 } ]